摘要:
@Autowired 与@Resource:1、@Autowired与@Resource都可以用来装配bean. 都可以写在字段上,或写在setter方法上。2、@Autowired默认按类型装配(这个注解是属业spring的),默认情况下必须要求依赖对象必须存在,如果要允许null值,可以设置它的 阅读全文
posted @ 2018-10-17 16:13
菜霸
阅读(1324)
评论(0)
推荐(0)
摘要:
Spring 开启Annotation <context:annotation-config> 和 <context:component-scan>诠释及区别 <context:annotation-config> 和 <context:component-scan>的区别 <context:ann 阅读全文
posted @ 2018-10-17 16:05
菜霸
阅读(289)
评论(0)
推荐(0)
浙公网安备 33010602011771号