| Interface | Description |
|---|---|
| ProxyList<E> |
| Class | Description |
|---|---|
| GlobalProfile |
全局的Profile配置中心
|
| GroupMap |
基于分组的Map
|
| GroupSet |
分组化的Set集合类
在配置文件中可以用中括号分隔不同的分组,每个分组会放在独立的Set中,用group区别
无分组的集合和`[]`分组集合会合并成员,重名的分组也会合并成员
分组配置文件如下:
|
| 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 © 2021. All rights reserved.