spring boot 运行提示:No active profile set, falling back to default profiles: default

时间:2018-04-18 14:26:05   收藏:0   阅读:8002

spring boot 运行提示:Process finished with exit code 1

经检查发现是由于在application.properties配置文件中将某些自定义配置项移除了,但是代码中没有删掉,导致以上错误发生。

例如,配置文件中原先存在:

jszs.path=/oracle/grgzpt-test/

代码中存在以下应用:
@Value("${jszs.path}")
private String jszsPath;

将配置文件中的jszs.path=/oracle/grgzpt-test/配置项删除,如果此时不移除@Value("${jszs.path}")则运行spring-boot应用会出现以上错误信息。

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!