Say for example, I have some beans annotated with @Foo
, and I want to keep track of these because I want to control what happens when they are initialized, is there a way to register a custom spring beanfactory that will allow me to do this?
What if I had another annotation @Bar
which also needs this special initialization?
My initial thought was to inform the user to annotated each bean with @Lazy
annotation, then using a bean factory post processor, I will change some properties of the bean definition.