小秦哥 发表于 2024-12-7 14:08:23

Web application could not be started as there was no org.springframewo

问题描述:

1. 当springboot项目启动时,报错Web application could not be started as there was no org.springframework.boot.web.servlet.server


大概原因:

1. Springboot的主启动类是自己写的,背面改了一下类名,但是main方法中的这行代码中类名没改过来:SpringApplication.run(本主启动类名.class, args)
2. 启动类不在 com.xx.xxx文件夹下,而在java文件夹下,如下错误案例:
https://i-blog.csdnimg.cn/direct/f9f895172f084c81a1b531e8f06a745d.png
3. 在maven/gradle中没有引入spring-boot-starter-web 的jar包。



免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: Web application could not be started as there was no org.springframewo