Spring framework
- BeanPostProcessor
- BeanFactoryPostProcessor
- AutowiredAnnotationBeanPostProcessor
- Bean: 如果用@Bean显式指定了名称,就用这个显式名称:
@Bean({"b1", "b2"}) // bean available as 'b1' and 'b2', but not 'myBean'
public MyBean myBean() {
// instantiate and configure MyBean obj
return obj;
}
- @SpringBootApplication
- @Resource
applied to a field or method, the container will inject an instance of the requested resource into the application component when the component is initialized.
applied to the component class, the annotation declares a resource that the application will look up at runtime.