| Class | Description |
|---|---|
| GlobalProfile |
全局的Profile配置中心
|
| Profile |
Profile可以让我们定义一系列的配置信息,然后指定其激活条件。
此类中我们规范一套规则如下:
默认的,我们读取${classpath}/default下的配置文件(*.setting文件),当调用setProfile方法时,指定一个profile,即可读取其目录下的配置文件。
比如我们定义几个profile:test,develop,production,分别代表测试环境、开发环境和线上环境,我希望读取数据库配置文件db.setting,那么:
test =》 ${classpath}/test/db.setting
develop =》 ${classpath}/develop/db.setting
production =》 ${classpath}/production/db.setting
|
Copyright © 2019. All rights reserved.