User Tools

Site Tools


java:spring-config

关于环境设置

1 maven命令的时候动态指定环境:mvn clean install -Dspring.profiles.active=aliyun 这样设置的优先级最高。

2 若没有在命令行中设置,默认读取:application.properties的配置,若读到配置如下:spring.profiles.active=aliyun

3 尝试去读取:application-aliyun.properties这个配置,若其中配置和application.properties重复的,就去覆盖
java/spring-config.txt · Last modified: 2020/10/28 03:28 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: 沪ICP备12046235号-2
Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki