I have a properties file whose content would be like below
myprop=key1:value1,key2:value2 myprop2=key21:value21,key22:value22
myprop3=key31:value31,key32:value32
How can I show the content on a web page and make it editable, so that, if I change the value of key2 to "value 444", it just changes that and everything else remains intact?
Apache commons configuration looks helpful but not sure how above can be accomplished
I solved it using Apache commons library.
Get Builder object.
Get Configuration object from Builder.
Iterate through all the keys and their values and you can return it as a JSON response to a web page (using controller class).
Make them editable their.
When you update one value of a key; click on save will call another method end point wherein input param would be config key and updated value. which will do config.setProperty and will do builder.save();.
By this, my property file would be updated.