- 博客(6)
- 问答 (1)
- 收藏
- 关注
原创 @Autowired使用中的问题及@Qualifire的使用
当使用@Autowired注解进行自动注时,Spring容器中匹配的Bean数目有且只有一个,否则将抛出BeanCrantionException异常。问题一:没有相匹配的Bean为解决这个问题,可以使用@Autowired(required=false),这就等于告诉Spring,在找不到匹配的Bean是也不报错。由于一般情况下使用@Autowired的地方都是需要注入Bean的,所以一般很少会用
2015-10-10 15:26:06 1754
原创 Spring中的<context:annotation-config/>
Spring中的< context:annotation-config/>在配置Spring的配置文件中,会常见到< context:annotation-config/>,其实它的作用是向Spring容器中注册四个BeanPostProcessor,其四个分别为: AutowiredAnnotationBeanPostProcessor CommonAnnotationBeanPostProces
2015-10-10 14:37:59 319
空空如也
ionic中tabs已经设为tabs-top,为什么还是离顶部这么远?
2016-07-10
TA创建的收藏夹 TA关注的收藏夹
TA关注的人