springboot 启动配置文件配置

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

 

(1)spring

在application.properties中加入app

spring.profiles.active=devide

(2)命令行

经过命令行参数it

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

相关文章
相关标签/搜索