【问题标题】:Spring Batch+Boot and: [org/springframework/web/WebApplicationInitializer.class] cannot be opened because it does not existSpring Batch+Boot 和:[org/springframework/web/WebApplicationInitializer.class] 无法打开,因为它不存在
【发布时间】:2015-06-11 21:28:39
【问题描述】:

我从http://projects.spring.io/spring-batch/#quick-start做了一个例子

当我尝试运行应用程序时出现异常:

Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load bean class: ; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/web/WebApplicationInitializer.class] cannot be opened because it does not exist
    at org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors(ConfigurationClassParser.java:395)
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:165)
2015-04-07 11:00:15.443 ERROR 11912 --- [           main] o.s.boot.SpringApplication               : Application startup failed

怎么了?项目很简单,就像在 Spring Batch 网页上一样。

【问题讨论】:

  • 你是如何尝试运行它的?
  • 通常,通过eclipse运行应用程序

标签: java spring spring-boot spring-batch


【解决方案1】:

看起来像

@EnableAutoConfiguration 

在主类上破坏应用程序(尝试初始化太多东西?) 删除此注释后, 只剩下@SpringBootApplication, 一切正常。

【讨论】:

    猜你喜欢
    • 2023-01-15
    • 2019-07-20
    • 2021-12-14
    • 1970-01-01
    • 2015-11-30
    • 2011-04-23
    • 2016-09-08
    • 2019-07-12
    • 2018-03-26
    相关资源
    最近更新 更多