java - Spring boot 2.0.6 石英缺少 org/springframework/scheduling/quartz/SpringBeanJobFactory in war
问题描述
在tomcat中启动应用程序时使用spring boot war build
Caused by: java.io.FileNotFoundException: class path resource [org/springframework/scheduling/quartz/SpringBeanJobFactory.class] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180)
即使它作为依赖项存在
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
</dependency>
并且spring-context-support
spring boot jar 构建和运行没有问题
如何解决战争部署的问题?
这是我在调试 jar 文件时得到的 - 也许这可能会有所帮助:(使用战争文件 ClassNotFoundException)
解决方案
想通了这个问题。当我从 IntelliJ Idea 运行 Tomcat 时,并没有反映引入到项目中的新依赖项。需要删除和重新导入战争/战争爆炸成 Tomcat 配置 - 没有问题。
推荐阅读
- javascript - Javascript没有正确地将对象推送到数组
- swift - 错误 - 条件中的变量绑定需要初始化程序
- angular - 电子邮件验证令牌作为来自 URL 的请求参数
- c# - 哪个程序集包含 AppBar C#?
- c# - 可以并发队列
多次出列同一个项目? - javascript - 顶级运算符的Mongo错误还有其他逻辑吗?
- c - CMake 中的 LibSodium 依赖项在 Docker 容器中无法解析
- python - numpy.random.choice 如何与替换一起使用?
- python - numpy 与轴 -1 连接使用 matplotlib 可视化
- android - Xamarin.Forms 应用程序 - 检测“关闭应用程序/等待”弹出消息