If I have a separate main application. Say 20 classes. All of them can at any time interact with beans, defined by the spring configuration (ApplicationContext). I would load the classpath application context at the main entry point of the application. But how do you reuse beans already created?
For example, this seems like a poor approach to setting ClasspathApplicationContext as a singleton, but that would be an idea.
I thought I saw a GlobalContextLocator or something like that, but did not see an example of how to use it.
source
share