springboot 启动配置文件配置

使用spring.profiles.active来分区配置,比如dev、test、prod等环境

(1)

在application.properties中加入

spring.profiles.active=dev

(2)

通过命令行参数

java -jar app.jar --spring.profiles.active=dev
 

原文地址:https://www.cnblogs.com/hzcya1995/p/13317428.html