简体   繁体   中英

How can i change properties in application.properties?

Could anyone advice any way how the properties in application.properties can be changed on application startup? On application start i can receive some propertied from DB that should override my appropriate properties at file. My goal is tho change them only once on app start... How can i achieve this?

Why don't you create a launcher for the program? It will be the launcher responsibility to locate and use appropriate properties? So when the launcher program starts you will check via DB connection for new properties install the properties on the appropriate location and then launch your real program.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM