会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Silent1376
Emancipate the mind,Seek truth from the facts.
博客园
首页
新随笔
联系
订阅
管理
2022年6月10日
【Java】Spring注入静态Bean的几种写法
摘要: 单例模式在Spring注解上的一种拓展用法 写法一,先配置自身Bean,作为静态成员,然后目标Bean作为自身Bean的实例成员‘ Spring初始化自身Bean时自动装配数据源Bean,从而附属到静态成员上 使用@PostConstruct实现 package cn.ymcd.aisw.jobSe
阅读全文
posted @ 2022-06-10 10:40 emdzz
阅读(1354)
评论(0)
推荐(0)
公告