摘要: 多环境配置的好处: 1.不同环境配置可以配置不同的参数2.便于部署,提高效率,减少出错 Properties多环境配置 1. 配置激活选项 spring.profiles.active=dev2.添加其他配置文件 application-test.properties application-dev 阅读全文
posted @ 2017-03-11 23:12 lys0410 阅读(3334) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/mindfloating/article/details/24583369 https://www.zhihu.com/question/37808426 阅读全文
posted @ 2017-03-11 22:08 lys0410 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Properties配置 配置文件的生效顺序,会对值进行覆盖: 1. @TestPropertySource 注解2. 命令行参数3. Java系统属性(System.getProperties())4. 操作系统环境变量5. 只有在random.*里包含的属性会产生一个RandomValuePro 阅读全文
posted @ 2017-03-11 14:30 lys0410 阅读(333) 评论(0) 推荐(0) 编辑