关于Unable to start embedded container异常

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.异常

启动项目时间报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.
在这里插入图片描述
加@SpringBootApplication @enableautoconfiguration都没有用

在这里插入图片描述
点击edit configuration
在这里插入图片描述
勾选Include dependencies with “Provided” scope 再次启动运行成功


版权声明:本文为weixin_45390130原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。