I am working on a project that means customizing an existing application (JasperServer 3.7.1), which is implemented in Spring 2.5.6 (plus many other Spring frameworks).
The application consists of the applicationContext * .xml host containing bean definitions that, when connected to Spring, enliven the application - I think this is a typical Spring application configuration, as if this is my first experience using Spring, it seems that it is all well-written and follows a lot examples that I saw on the Internet and in books.
Since I am actually modifying an existing application by modifying beans as filterChainProxy (for example, we have our own security model), I am afraid to modify the actual configuration files that come with the product, instead, I might prefer to add additional appContext configuration files to existing ones override existing beans (i.e. leave the original configuration in tact as much as possible).
I managed to do this by creating a beans implementation of BeanFactoryPostProcessor, which, when initializing a pre-bean, allows me to modify the existing values โโof the / bean property of the user link. Everything seems to be working fine.
My query: let's say I had a bean with a property related to another bean, and my overrider bean changed this link to my own version of the bean, will Spring still create a bean that is no longer referenced? The reason is clearly that some of these unused beans may take up resources, which may be unwanted overhead.
Thank you in advance
source share