Home > Back-end >  After launched springboot program, how to dynamically modify yml file configuration information insi
After launched springboot program, how to dynamically modify yml file configuration information insi

Time:05-27

Recently received a project, is under the framework of springboot do a similar connection is essentially before landing interface, database and query information, similar to the following figure


Question: because this project is for different user, different users have different database account and password, also have different database, and then the information is generally stored in springboot (yml) in the configuration file, but springboot package starts, yml inside information can't seem to modify (I don't know much about it), so I want to ask the Java can what method can be modified after springboot start yml configuration information and then immediately? Is the best way to a way to implement,

Help!!!!! Thank you!!!!!!

CodePudding user response:

Netizens have said with what many instances beans, but I am not very clear, some netizens in detailed said this to me

CodePudding user response:

Or other means can also

CodePudding user response:

Have a regular task, a few minutes can refresh a configuration file

CodePudding user response:

Springboot + nacos, the database configuration to the nacos, change configuration can realize synchronous update configuration on the nacos
https://blog.csdn.net/Beijing_L/article/details/117040244? SPM=1001.2014.3001.5501
  • Related