springboot--配置文件加载顺序

-file:./config(内部配置

-file:./ (内部配置)

-classpath:/config (外部配置)

-classpath:/ (外部配置)

运维: spring -jar springboot.jar --spring.config.location={location}

此方式优先级最高。

如图所示,优先级由高到低。

外部配置加载顺序

猜你喜欢

转载自www.cnblogs.com/comeluder/p/10416432.html