Description
This is a new feature request in the core Spring Framework to consider adding a "refreshable" AnnotationConfigApplicationContext
.
To my knowledge, the only ApplicationContext
implementations that allow refresh capabilities are XML configuration based ApplicationContexts
and Web-based ApplicationContexts
, as indicated in the Javadoc for AbstractRefreshableConfigApplicationContext
.
The idea and motivation originated from a user of Spring Boot for Apache Geode (SBDG) to be able to refresh an AnnotationConfigApplicationContext
in his use case. As such, I took it upon myself to create such an ApplicationContext
implementation (prototype), and can be seen here.
I have written a single test case to prove it works, or rather that it is at least possible.
Certainly, much more thought and testing would be required to make this a full fledged feature of the core Spring Framework. But, I thought it was an interesting idea and perhaps a useful feature for the core Spring Framework overall.
In fact, I was bit surprised that this capability didn't already exist or that another user had not requested it, already. Perhaps someone has and I missed it, or even this has been considered before, but I did not find anything.
Anyway, happy to work with interested parties to integrate this new RefreshableAnnotationConfigApplicationContext
into the core Spring Framework if the team feels this would be a nice add and would benefit our users.