新建springBoot项目合集

原文地址:

https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/88262924

场景

在Eclipse中新建SpringBoot项目后提示:

The type org.springframework.context.ConfigurableApplicationContext cannot be resol

 

解决

关掉Eclipse

进入到项目所在目录。命令行运行

mvn dependency:purge-local-repository

 

重新启动eclipse就不报错了

 

场景

启动项目失败,报错信息如下:提示: Unregistering JMX-exposed beans on shutdown

解决

(1)确保导入了 spring-boot-starter-parent、spring-boot-starter-web

<parent>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-parent</artifactId>
  <version>2.0.2.RELEASE</version>
</parent>

<dependencies>
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
  </dependency>
</dependencies>

 

maven项目更新之后还是不行,有可能是自己的Tomcat包损坏了,在仓库删了重新update,应该就可以成功启动。

 

posted @ 2020-08-15 18:36  向日葵呀  阅读(176)  评论(0编辑  收藏  举报