IDEA启动选择properties配置文件

比如我的项目下有2个.properties文件,一个是application.properties,一个是application-local.properties,在本地的时候想指定用application-local.properties,那么
在这里插入图片描述


那么如何在本地以某个properties配置文件启动呢?
解决方案如下:
配置如下:

--spring.profiles.active=local

在这里插入图片描述


版权声明:本文为qq_36640480原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。