我正在寻找一个 Java API,它允许以以下格式写入和读取属性文件:
<prefix>.<index>.<suffix>=<value>
例如:
launcher.1.id=23
launcher.1.name=abc
launcher.1.date=123123
launcher.2.id=sdfsdf
launcher.2.name=Asdfdsf
launcher.2.date=ghfgh
cec.1.id=sdfsdf
cec.1.name=Asdfdsf
cec.1.date=ghfgh
cec.2.id=sdfsdf
cec.2.name=Asdfdsf
cec.2.date=ghfgh
#...
log4j 使用非常相似的格式来配置 appenders:
log4j.rootLogger=debug, stdout, R
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=example.log
log4j.appender.R.MaxFileSize=100KB
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
任何人都知道是否有适用于这种情况的 Java 库?
谢谢,伊利亚