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

查看:19
本文介绍了如何使用 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天全站免登陆