Is there a way to print all the spring beans that are loaded on startup?I am using Spring 2.0.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Yes, get ahold of
ApplicationContext
and 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
BeanPostprocessor
bean. It will be notified for each bean.With Spring Boot and the actuator starter
you can check the endpoint
/beans