I'd like to ask is there anyway to detect all beans have been instantiated in Spring framework ?
I'm using FileSystemXmlApplicationContext class of Spring library to load in my Spring configuration XML.
I do understand that I can get all beans after they are been instantiated in bean factory. My dumb solution is by using getBean(String name) method in Spring API and check against with all desired beans in the Spring configuration XML. If all desired beans can be found, I can infer that all beans have been instantiated.
The reason I don't prefer the dumb solution is anytime I update my configuration XML, I need to update my source code of checking against again. If this solution has more vulnerabilities, please feel free to point out.
Thanks your time and kindly suggestions