解决springboot项目在eclipse中可以启动在idea中报错

pringboot项目在eclipse中正常启动运行,但是在idea中一直出错。

解决方案为:第一步

  1. <dependency>

  2. <groupId>org.springframework.boot</groupId>

  3. <artifactId>spring-boot-starter-tomcat</artifactId>

  4. <scope>provided</scope>

  5. </dependency>

将<scope>provided</scope>注释掉

第二步:

添加servlet-api的jar

  1. <dependency>

  2. <groupId>javax.servlet</groupId>

  3. <artifactId>javax.servlet-api</artifactId>

  4. <version>3.1.0</version>

  5. </dependency>

第三步:

 

指定Working directory

猜你喜欢

转载自blog.csdn.net/u013938484/article/details/86139840
今日推荐