lazy-init
<bean lazy-init="true"></bean>
<beans default-lazy-init="true"><beans>
scope
- singleton,prototype,request,session,global session
- 默认singleton
autowire
- no,byName
- byType:多个匹配抛异常
- constructor:按参数类型匹配,无匹配抛异常
- 默认no
init-method,destroy-method
<beans default-init-method="" default-destroy-method="" ></beans>
<bean init-method="" destroy-method=""></bean>
implements InitializingBean
implements DisposableBean
- default优先级最低,在其余二者存一时失效
- default即便定义,实际无该方法时,也不报错
未定义id时
FactoryBean
public interface FactoryBean<T> {
T getObject() throws Exception;
Class<?> getObjectType();
boolean isSingleton();
}
BeanPostProcessor
- AdvisorAdapterRegistrationManager是BeanPostProcessor在AOP里的应用,再细看下