53 Star 318 Fork 34

smartboot / smart-servlet

 / 详情

class path resource [org/springframework/boot/web/servlet/server/AbstractServletWebServerFactory.class] cannot be opened because it does not exist

已完成
创建于  
2024-01-25 11:32

讲springboot项目默认servlet替换成smart-servlet,

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.smartboot.servlet</groupId>
            <artifactId>smart-servlet-spring-boot-starter</artifactId>
            <version>0.6</version>
        </dependency>

运行项目提示:Caused by: java.io.FileNotFoundException: class path resource [org/springframework/boot/web/servlet/server/AbstractServletWebServerFactory.class] cannot be opened because it does not exist,如图:
输入图片说明
其中报错是在SpringApplication.run(AppConfig.class, args);中抛出来的。
大佬看看 麻烦了 感谢!!!!

评论 (3)

SAO 创建了任务
SAO 任务状态待办的 修改为进行中
SAO 任务状态进行中 修改为待办的
展开全部操作日志

这个是spring报出来的啊。 或者你提供下源码,我再试试

大佬,我测试到问题点了。JDK用的是1.8.0_211的版本,springboot版本是1.5.9.RELEASE。这里用的springboot的版本不适配,我换成2.6.7的就没问题了

👌🏻

三刀 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
351975 smartdms 1578921064 8039767 wings of freedom 1599623312
Java
1
https://gitee.com/smartboot/smart-servlet.git
git@gitee.com:smartboot/smart-servlet.git
smartboot
smart-servlet
smart-servlet

搜索帮助