当前位置:网站首页>静态类使用@Resource注解注入
静态类使用@Resource注解注入
2022-06-30 19:32:00 【蜗牛使劲冲】
工作中需要,简单记录一下
@Component
public class AccountUtil {
private static AccountIdDao accountIdDao;
@Resource
private AccountIdDao accountDao;
@PostConstruct
public void init(){
accountIdDao = accountDao;
}
public static List<AccountIdInfoPO> getAccount(String channel) {
//获取用户列表
QueryWrapper<AccountIdInfoPO> query = new QueryWrapper<>();
query.eq("channel", channel);
return accountIdDao.selectList(query);
}
}
边栏推荐
- ABAQUS 2022最新版——完善的现实仿真解决方案
- Spark - 一文搞懂 Partitioner
- 说实话ThreadLocal真不是啥高级的东西
- Kubernetes为什么会赢,容器圈的风云变幻!
- Enterprise middle office planning and it architecture microservice transformation
- 【450. 删除二叉搜索树中的节点】
- [multithreading] use the thread pool to implement a simple thread pool
- A detailed explanation of the implementation principle of go Distributed Link Tracking
- 网易云签到可抽奖?那一年我能签到365天。不信?你看。
- 条件编译
猜你喜欢

Abaqus 2022软件安装包和安装教程

盘点华为云GaussDB(for Redis)六大秒级能力

Smarter! Airiot accelerates the upgrading of energy conservation and emission reduction in the coal industry

VR全景中特效是如何编辑的?细节功能如何展示?

正则系列之字符类

无线充U型超声波电动牙刷方案开发
![[jetsonnano] [tutorial] [introductory series] [i] how to enable VNC sharing](/img/f5/3f0f69739caa22809f40cf4b7483fe.png)
[jetsonnano] [tutorial] [introductory series] [i] how to enable VNC sharing

Data intelligence - dtcc2022! China database technology conference is about to open

Detailed explanation of specific methods and steps for TCP communication between s7-1500 PLCs (picture and text)

mysql统计账单信息(上):mysql安装及客户端DBeaver连接使用
随机推荐
VR云展厅如何给线下实体带来活力?有哪些功能?
“更福特、更中国”拨云见日,长安福特王牌产品订单过万
Application of VoIP push in overseas audio and video services
mysql主从同步
CADD课程学习(2)-- 靶点晶体结构信息
Graduates
1. 爬虫之Beautifulsoup解析库&在线解析图片验证码
Audio and video architecture construction in the super video era | science and Intel jointly launched the second season of "architect growth plan"
MQ selection (2022.5.9-5.15)
Tencent conference application market was officially launched, with more than 20 applications in the first batch
[jetsonnano] [tutorial] [introductory series] [i] how to enable VNC sharing
Go language learning tutorial (13)
Buttons to achieve various effects and functions. Reading this article is enough
Smarter! Airiot accelerates the upgrading of energy conservation and emission reduction in the coal industry
CV+Deep Learning——网络架构Pytorch复现系列——basenets(BackBones)(一)
条件编译
毕业季职场人
启动PHP报错ERROR: [pool www] cannot get uid for user ‘@[email protected]’
永远不要使用Redis过期监听实现定时任务!
太湖 “中国健康农产品·手机直播万里行”走进太湖