apache commons configuration loads property until “,” character

后端 未结 5 898
北荒
北荒 2020-12-16 13:02

I want to load configuration (apache commons configuration) from a properties file. My program is:

PropertiesConfigu         


        
5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 13:39

    Actually propConfig.setDelimiterParsingDisabled(true) is working, but you must load the config file after this setting, for example:

    propConfig = new PropertiesConfiguration();
                propConfig.setDelimiterParsingDisabled(true);
                propConfig.load(propertiesFile);
    

    if your code like is :

    propConfig = new PropertiesConfiguration(propertiesFile); propConfig.setDelimiterParsingDisabled(true);

    then the setting won't work

提交回复
热议问题