(六)關於spring中的FactoryBean與ObjectFactory以及其區別

1.查看接口定義以及其區別 public interface FactoryBean<T> { //獲取對象的工廠方法 @Nullable T getObject() throws Exception; //對象類型 @Nullable Class<?> getObjectType(); //是不是單例,這個屬性決定了spring是否基於緩存
相關文章
相關標籤/搜索