首页 > 解决方案 > spring-ws - Oracle Weblogic 12c

问题描述

我正在尝试在我的 Weblogic 12c 上部署一个基于 SOAP 的应用程序,但我遇到了很多问题。

我已经实施SpringBootServletInitializer

public class AppSoapService extends SpringBootServletInitializer implements WebApplicationInitializer {

    public static void main(String[] args) {
        SpringApplication.run(AppSoapService.class, args);
    }

    /**
     * Configure the application. Normally all you would need to do is to add sources
     * (e.g. config classes) because other settings have sensible defaults. You might
     * choose (for instance) to add default command line arguments, or set an active
     * Spring profile.
     *
     * @param builder a builder for the application context
     * @return the application builder
     * @see SpringApplicationBuilder
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(AppSoapService.class, WebServiceConfig.class);
    }

}

以下如何在 weblogic 12C 上运行 Spring Boot 应用程序?Spring Boot 异常:无法打开 ServletContext 资源 [/WEB-INF/dispatcherServlet-servlet.xml],我已经创建,dispatcherServlet-servlet.xml但现在出现以下错误:

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/messageDispatcherServlet-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/messageDispatcherServlet-servlet.xml]

这是我的weblogic.xml

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app       http://xmlns.oracle.com/weblogic/weblogic-web-app/1.9/weblogic-web-app.xsd">
    <wls:context-root>as-soap</wls:context-root>
    <wls:container-descriptor>
        <wls:prefer-web-inf-classes>false</wls:prefer-web-inf-classes>
        <wls:prefer-application-packages>
            <wls:package-name>org.slf4j</wls:package-name>
            <wls:package-name>org.springframework</wls:package-name>
            <wls:package-name>org.apache</wls:package-name>
            <wls:package-name>org.springdoc</wls:package-name>
            <wls:package-name>wsdl4j</wls:package-name>
            <wls:package-name>org.mapstruct</wls:package-name>
            <wls:package-name>com.fasterxml</wls:package-name>
        </wls:prefer-application-packages>
    </wls:container-descriptor>

    <wls:library-ref>
        <wls:library-name>as-arch</wls:library-name>
        <wls:specification-version>1.2</wls:specification-version>
        <wls:implementation-version>1.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
        <wls:library-name>as-service</wls:library-name>
        <wls:specification-version>1.3</wls:specification-version>
        <wls:implementation-version>1.3.0</wls:implementation-version>
    </wls:library-ref>
</wls:weblogic-web-app>

有人可以帮助我吗?

标签: spring-bootweblogic

解决方案


推荐阅读