springboot怎么分开发环境

2025-02-26 03:39:42
推荐回答(1个)
回答1:

些式优先级:

命令行参数
自java:comp/envJNDI属性
Java系统属性(System.getProperties())
操作系统环境变量
RandomValuePropertySource配置random.*属性值
jar包外部application-{profile}.properties或application.yml(带spring.profile)配置文件
jar包内部application-{profile}.properties或application.yml(带spring.profile)配置文件
jar包外部application.properties或application.yml(带spring.profile)配置文件
jar包内部application.properties或application.yml(带spring.profile)配置文件
@Configuration注解类@PropertySource
-