Yes, get ahold of ApplicationContext
and call .getBeanDefinitionNames()
You can get the context by:
- implementing
ApplicationContextAware
- injecting it with
@Inject
/ @Autowired
(after 2.5)
- use
WebApplicationContextUtils.getRequiredWebApplicationContext(..)
Related: You can also detect each bean's registration by registering a BeanPostprocessor
bean. It will be notified for each bean.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…