@Component
相当与xml文件中的bean标签的配置@component() 括号里面配置的是beanName
不配置beanName的时候默认是类名的首字母小写作为beanNam
然后在xml配置扫描注解
其他类型的注解开发
例子
@component衍生注解
是为了见名知意 用法和作用和component一样
bean的注入注解
Qualifier 结合Autowired使用 指定要注入的名称 根据名称注入相对于的bean
非自定义的bean的注解开发
@Configuration
替代xml文件
2,3的参数可以写成数组的形式{a1, a2, a3, a4, .....}
括号的参数填注解类的 .class