如何使用PropertiesConfiguration写入多行属性值? [英] How to write multiple line property value using PropertiesConfiguration?

查看:223
本文介绍了如何使用PropertiesConfiguration写入多行属性值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个属性文件,该文件的属性带有List值(用逗号分隔),如何在多行中写此属性? (逗号后加反斜杠)?

I have a properties file with a property with a List value (comma separated), how to write this property in a multi-line ? (backslash after the comma)?

我找不到关于此的任何信息,或者至少没有找到将逗号转义为逗号和反斜杠的信息.

I can't find anything about this or at least about escaping comma to comma and backslash.

推荐答案

如果您的意思是以下内容;只是依靠反斜杠+行尾.我发现它记录在: http://docs.oracle.com/javase/6/docs/api/java/util/Properties.html

If you mean the following; that just relies on backslash + end-of-line. I just found it documented in: http://docs.oracle.com/javase/6/docs/api/java/util/Properties.html

primes = 2,\
    3,\
    5,\
    7,\
    11

这篇关于如何使用PropertiesConfiguration写入多行属性值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆