Rebootable properties in Spring beans (Java 1.5)

I would like to reload the Spring bean properties at runtime so that I don't have to restart the web application until the properties are reset.

For example, the endpoint of a web service client can be changed at run time without reloading or nested properties through an XML configuration or annotations.

I saw this link and would like to do the same with Java 1.5.

I am not looking for the full code, but some kind of guide.

+4
source share
1 answer

I saw jpathwatch being used to accomplish something similar, and this works with Java 5. This allows you to poll file or directory changes at intervals, for example. every second.

If your webservice endpoint URI was an emergency for the configuration file, you can configure jpathwatch to monitor this configuration file, and when it has changed, recreate your web service using the new configuration value.

I'm not quite sure how this can be used to reload spring beans, maybe this is possible.

Website: http://jpathwatch.wordpress.com/

0
source

Source: https://habr.com/ru/post/1482259/


All Articles