Reading Java Properties file without escaping values

前端 未结 8 1774
滥情空心
滥情空心 2020-12-06 09:54

My application needs to use a .properties file for configuration. In the properties files, users are allow to specify paths.

Problem

Propert

8条回答
  •  醉梦人生
    2020-12-06 10:23

    You could try using guava's Splitter: split on '=' and build a map from resulting Iterable.

    The disadvantage of this solution is that it does not support comments.

提交回复
热议问题