IDEA开发工具报错----spring boot启动报错

dea启动spring boot项目报错:spring

org.springframework.context.ApplicationContextException: Unable to
start embedded container; nested exception is
org.springframework.context.ApplicationContextException: Unable to
start EmbeddedWebApplicationContext due to missing
EmbeddedServletContainerFactory bean.
Caused by: org.springframework.context.ApplicationContextException:
Unable to start EmbeddedWebApplicationContext due to missing
EmbeddedServletContainerFactory bean.

依赖包:tomcat

org.springframework.boot
spring-boot-starter-tomcat
${springboot-version}
provided

打包是不须要tomcat的,因此这里把tomcat的依赖改成provided,可是idea存在一个bug,就是provided的pom不会加入classpath中,因此运行的时候就找不到tomcat相关的包,
解决:springboot

clipboard.png

选择debug run 或run启动项目ide

相关文章
相关标签/搜索