SpringBoot项目的搭建完成后启动出现 Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean这个问题的解决方法:
1.查看pom.xml中是否缺少web启动器的依赖:
org.springframework.boot
spring-boot-starter-tomcat
2.当前类名与启动的class对象名称不一致
修改class对象名称之后的结果
可以成功启动了。
这两种是对于这个错误的解决方法,如果有补充希望大佬们在下方留个言。另,希望这两个解决方法可以帮到你。
感谢观看。