Java 类org.apache.commons.configuration2.builder.FileBasedBuilderParametersImpl 实例源码

项目:sbc-qsystem    文件:OrangeMainboard.java   
@Override
public void showBoard() {
    File paramFile = new File("config/mainboardfx.properties");
    try {
        final FileBasedConfigurationBuilder<FileBasedConfiguration> builder = new FileBasedConfigurationBuilder<FileBasedConfiguration>(
            PropertiesConfiguration.class)
            .configure(
                new FileBasedBuilderParametersImpl().setFile(paramFile).setEncoding("utf8"));
        cfg = builder.getConfiguration();
    } catch (ConfigurationException ex) {
        QLog.l().logger()
            .error("Не загружен файл конфигурации " + paramFile.getAbsolutePath(), ex);
        throw new ServerException(
            "Не загружен файл конфигурации " + paramFile.getAbsolutePath());
    }

    super.showBoard();
}
项目:commons-configuration2-jackson    文件:JacksonConfigurationBuilderProvider.java   
public JacksonConfigurationBuilderProvider(final Class<T> configurationClass) {
    super(
        FileBasedConfigurationBuilder.class.getName(),                          // Normal builder.
        ReloadingFileBasedConfigurationBuilder.class.getName(),                 // Reloading builder.
        configurationClass.getName(),                                           // Configuration class.
        Collections.singleton(FileBasedBuilderParametersImpl.class.getName())   // Parameter class.
    );
}