spring中bean的细节之三种创建Bean对象的方式

1、构造函数
<bean id="accountService" class="com.itheima.service.impl.AccountServiceImpl">
2、普通方法
<bean id="instanceFactory" class="com.itheima.factory.InstanceFactory">
<bean id="accountService" factory-bean="instanceFactory" factory-method="getAccountService">
3、静态方法
<bean id="accountService" class="com.itheima.factory.StaticFactory" factory-method="getAccountService">
全部评论

相关推荐

牛客10001:问就是六个月,全国可飞,给钱就干
点赞 评论 收藏
分享
03-18 09:45
莆田学院 golang
牛客749342647号:佬,你这个简历模板是哪个,好好看
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务