SpringBoot应用程序未在Tomcat中部署

时间:2016-02-03 10:04:13

标签: spring maven

A child container failed during start

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:188)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:917)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    ... 6 common frames omitted
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.addFilter(Ljava/lang/String;Ljavax/servlet/Filter;)Ljavax/servlet/FilterRegistration$Dynamic;
    at org.springframework.boot.context.embedded.FilterRegistrationBean.onStartup(FilterRegistrationBean.java:257)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.selfInitialize(EmbeddedWebApplicationContext.java:222)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:84)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:206)
    at org.springframework.boot.context.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:54)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5156)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 6 common frames omitted

2016-02-03 15:20:57.878 ERROR 8360 --- [           main]     org.apache.catalina.core.ContainerBase   : A child container failed during start

和 我的主要课程

@Configuration @ComponentScan("com")
//@EnableConfigurationProperties({DataSourceObject.class})
@EnableAutoConfiguration
(exclude={DataSourceAutoConfiguration.class,DataSourceInitializedEvent.class,HibernateJpaAutoConfiguration.class,       DataSourceTransactionManagerAutoConfiguration.class,JndiDataSourceAutoConfiguration.class,JndiConnectionFactoryAutoConfiguration.class,PersistenceExceptionTranslationAutoConfiguration.class})
 @SpringBootApplication

 public class Application {

    /**
      * Starts spring boot application.
      * @param args args
      */
     public static void main(String[] args) {           
         // BasicConfigurator.configure(); Set up a simple configuration that logs on the console.
         SpringApplication.run(Application.class, args);
     }
}

我在POM.xml中添加了所有依赖项

0 个答案:

没有答案