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 In addition to 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.
Comments
Post a Comment