com.typesafe.config.Config

com.typesafe.config.ConfigObject;
com.typesafe.config.Config;

1.在pom文件中引入依赖

        <dependency>
            <groupId>com.typesafe</groupId>
            <artifactId>config</artifactId>
            <version>1.3.3</version>
        </dependency>

2.加载配置

 public static void parseConfig() {
    File confFile = new File(Common.configFiled);
    config = ConfigFactory.parseFile(confFile);
  }

你可能感兴趣的:(日常,Java)