I've got a properties configuration file with properties that have many values separated by commas. I want to put comments next to some of them, but it seems that this is not possible?
I want to be able to do something like this:
property: value1,\
value2,\
...
value44,\
value45,\
# value45 comment
...
value89,\ # another comment
value90
Clarification: I'm supplying the config to a web service I don't own, so I can't use one of the extensions to the properties format like bracket-properties
Unfortunately, it's not possible as Java properties files can have only single line # comments
.
However, you might be aware that you can also define properties in xml format and the XML syntax will let you enter multi-line comments.
If you decide to give XML a chance then you will need to call Properties#loadFromXML(InputStream)
to load your XML property file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With