java - How to re-initialize beans in spring without application server restart -


I am programming service to get data from the database and provide them through the REST service. It uses Spring MVC. My database connection frame is in the property file from which data source is loaded as a bean during the reference in the spring.

Now my problem is - I want to change the configuration files in properties (for example change database information), but I can not risk the restart of the application server that does not load very new configuration

I again Can start spring reference or some special bean so newly defined properties are used?

Text after "div class =" itemprop = "text">

If you want multiple data sources in spring and in order to dynamically determine the appropriate data source You need to be provided with this spring. You must implement your lookup key logic to define the data source in the source-source defined CurrentLookupKey () with it you run on the runtime Can map different beans for different data sources Are there. Following are some questions related to this reference.

In addition to



Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -