会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
拾柒的
博客园
首页
新随笔
联系
订阅
管理
2021年10月13日
spring-bean的作用域及自动装配
摘要: 1.单例模式(spring默认机制) <bean id="student2" class="com.pojo.Student" c:name="Tom" c:age="18" scope="singleton"></bean> 2.原型模式:每次从容器中get的时候,都会产生一个新对象! <bean
阅读全文
posted @ 2021-10-13 20:03 拾柒的
阅读(47)
评论(0)
推荐(0)