dubbo+springboot(外置tomcat)启动客户端抛错,服务端没启动,内置tomcat正常访问.
相关配置:
启动类:
@SpringBootApplication
@EnableScheduling
public class FootprintWebApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder
application) {
return application.sources(FootprintWebApplication.class);
}
public static void main(String[] args) {
SpringApplication application = new
SpringApplication(FootprintWebApplication.class);
application.setWebApplicationType(WebApplicationType.SERVLET);
application.run(args);
}
}
关闭启动检查:
dubbo:
reference:
check: false
connections: 10
registry:
check: false
异常:
严重: Exception sending context initialized event to listener instance of class
[org.springframework.web.context.ContextLoaderListener]
java.lang.IllegalStateException: Cannot initialize context because there is
already a root application context present - check whether you have multiple
ContextLoader* definitions in your web.xml!
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:262)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1420)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
rootcontext重复注册??web.xml我也没用。为啥内置tomcat一切正常呢?谢谢解答
[ Full content available at:
https://github.com/apache/incubator-dubbo-spring-boot-project/issues/397 ]
This message was relayed via gitbox.apache.org for
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]