Spring Boot 启动报错解决:No active profile set, falling back to default profiles: default

在SpringBoot启动时,控制台打印出来的信息有这么一条:No active profile set, falling back to default profiles: default。如下图:

 这句话的意思是:没有指定项目的配置文件,使用了默认配置文件。也就是application.properties或者application.yml

解决办法:

加入spring.profiles.active=local即可

 

猜你喜欢

转载自blog.csdn.net/weixin_47382783/article/details/132523489