
Spring 基础 IOC控制反转
1、@Autowired是Spring自带的,@Resource是JSR250规范实现的,@Inject是JSR330规范实现的2、@Autowired、@Inject用法基本一样,不同的是@Inject没有required属性3、@Autowired、@Inject是默认按照类型匹配的,@Resource是按照名称匹配的4、@Autowired如果需要按照名称匹配需要和@Qualifier一起使用,@Inject和@Named一起使用,@Resource则通过name进行指定。












