![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring
kunlunshan321
这个作者很懒,什么都没留下…
展开
-
Spring 注释依赖反转
1、AutoWired 是默认是bytype ,Resource默认是byname? 2、AutoWired Resource 注释的bean才XML文件中还是需要声明的,如 @private Office office ,则在XML文件上还有 "car" class="com.baobaotao.Car" scope="singleton"> "brand原创 2016-11-21 15:29:14 · 207 阅读 · 0 评论 -
Spring MVC
1、组件扫描,将带有@Component等类注册为Spring上下文的bean context:component-scan base-package="pack.pack"/> 2、注入bean @Autowired @Resource等,需要: context:annotation-config/> 但 context:component-scan base-package=”X原创 2017-06-15 10:11:34 · 206 阅读 · 0 评论