0
点赞
收藏
分享

微信扫一扫

springboot报错Unable to start EmbeddedWebApplicationContext due

mjjackey 2022-08-17 阅读 101

springboot项目在启动时需要把servlet容器编译进去,这时候如果你的maven依赖里面没有配置jetty或者tomcat相关依赖就会报错。

解决方法:

jetty添加

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
<scope>provided</scope>
</dependency>

tomcat添加:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>

 

举报

相关推荐

0 条评论