SpringBoot學習-第三章 Spring高級應用-

Spring Aware 一般@Component標識的Bean由容器所管理,但它自身是不能和容器交互的(解耦),你只能經過@Autowired引入並使用。而Aware接口爲Bean提供了與容器交互的能力。java BeanNameAware:獲取容器中Bean的名稱 BeanFactoryAware:獲取當前Bean的Factory,從而調用容器的服務 MessagerSourceAware:獲
相關文章
相關標籤/搜索