【发布时间】:2015-06-10 08:35:50
【问题描述】:
我有一个 ini 配置,我使用 org.apache.commons.configuration.INIConfiguration 读取它。这工作正常。 但现在我的配置中有一个带点(句号)的节名。
[fineSection]
fineKey = fineValue
[worry.Section]
worryKey = worryValue
这是我的代码:
String content = getMyConfiguration();
INIConfiguration iniConfiguration = new INIConfiguration();
iniConfiguration.load(new ByteArrayInputStream(content.getBytes()));
Set<?> sections = iniConfiguration.getSections();
我明白了
sections = [fineSection, worry].
但我需要
sections = [fineSection, worry.Section].
如何解决这个问题,有可能吗?
谢谢,托马斯
【问题讨论】:
标签: java configuration ini