Is there a way to print all the spring beans that are loaded on startup?I am using Spring 2.0.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, get ahold of
ApplicationContextand call.getBeanDefinitionNames()You can get the context by:
ApplicationContextAware@Inject/@Autowired(after 2.5)WebApplicationContextUtils.getRequiredWebApplicationContext(..)Related: You can also detect each bean’s registration by registering a
BeanPostprocessorbean. It will be notified for each bean.