开发者

spring write back to property file

Is there something in spring where we can write back to an property file ?

Lets say , that we开发者_StackOverflow中文版 have a property "reportname=SOME REPORT". If we have a GUI where the user can change it to "reportname=SOME OTHER REPORT".

Then, is there something in spring that can write that value back to the property file ?

Also, is there a xml property file reader?

i.e. Can I pass an xml file in "classpath:filename" for the propertyPlaceHolder.


I don't know if Spring can actually let you modify the application context configuration file, but if it is that important to persist the value of "reportName" for a given report configuration, let's assume, you should store the report configuration in a database, or use a .properties file instead and populate the report name property value using the init method of the spring bean?

Remember the idea of having a application context configuration file is to set up dependencies prior to running you app.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜