SpringBoot启动报错: No active profile set, falling back to default profiles: default

    由于网络上的其它博文,没能解决我的这个问题,然后就记录一下。或许还有很多其它原因导致这个问题的发生,这里就简述一下我遇到的。其它的遇到了再补充吧。

SpringBoot项目启动后 迅速 执行结束,控制台打印: No active profile set, falling back to default profiles: default(如下图)

经验证,系 pom 文件配置的 tomcat 发生错误导致,原配置tomcat如下:

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

修改后:(删去<scope>):

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

对于scope标签的用法,我就不细述了,可以参考这个博文

猜你喜欢

转载自blog.csdn.net/J1014329058/article/details/90608347