Class Profile

java.lang.Object
org.aoju.bus.setting.metric.Profile
All Implemented Interfaces:
Serializable

public class Profile extends Object implements Serializable
Profile可以让我们定义一系列的配置信息,然后指定其激活条件 此类中我们规范一套规则如下: 默认的,我们读取${classpath}/default下的配置文件(*.setting文件),当调用setProfile方法时,指定一个profile,即可读取其目录下的配置文件 比如我们定义几个profile:test,develop,production,分别代表测试环境、开发环境和线上环境,我希望读取数据库配置文件db.setting,那么:
  1. test = ${classpath}/test/db.setting
  2. develop = ${classpath}/develop/db.setting
  3. production = ${classpath}/production/db.setting
Since:
Java 17+
Author:
Kimi Liu
See Also: