当前位置:网站首页>Static classes use @resource annotation injection
Static classes use @resource annotation injection
2022-06-30 20:11:00 【The snail dashed hard】
You need to , Take a brief note of
@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) {
// Get the list of users
QueryWrapper<AccountIdInfoPO> query = new QueryWrapper<>();
query.eq("channel", channel);
return accountIdDao.selectList(query);
}
}
边栏推荐
- Network planning | [five transport layers and six application layers] knowledge points and examples
- 6-1漏洞利用-FTP漏洞利用
- 【ICLR 2021】半监督目标检测:Unbiased Teacher For Semi-Supervised Object Detection
- MySQL master-slave synchronization
- 【论文阅读】Trajectory-guided Control Prediction for End-to-end Autonomous Driving: A Simple yet Strong Baseline
- Go语言学习教程(十三)
- 盘点华为云GaussDB(for Redis)六大秒级能力
- 8 - 函数
- 小学期,第三场-下午:WEB_xxe
- CV+Deep Learning——网络架构Pytorch复现系列——basenets(BackBones)(一)
猜你喜欢
随机推荐
腾讯会议应用市场正式上线,首批入驻超20款应用
Data intelligence - dtcc2022! China database technology conference is about to open
[iccv 2019] characteristics precise supervision of feature super resolution for small object detection
无线充U型超声波电动牙刷方案开发
Ten percent of the time, the tar command can't parse the English bracket "()" when decompressing the file
Detailed steps for Django to upload excel tables and write data to the database
exness:流动性系列-流动性清洗和反转、决策区间
Taihu Lake "China's healthy agricultural products · mobile phone live broadcast" enters Taihu Lake
VB的基本语法
标配10个安全气囊,奇瑞艾瑞泽8安全防护无死角
CADD课程学习(1)-- 药物设计基础知识
解决arm_release_ver of this libmali is ‘g2p0-01eac0‘,rk_so_ver is ‘4‘,libgl1-mesa-dev不会被安装,存在未满足的依赖关系
启动PHP报错ERROR: [pool www] cannot get uid for user ‘@[email protected]’
qt中toLocal8Bit和toUtf8()有什么区别
What is the difference between tolocal8bit and toutf8() in QT
基于slate构建文档编辑器
Solution to rollback of MySQL database by mistake deletion
QQmlApplicationEngine failed to load component qrc:/main.qml:-1 No such file or directory
8 - 函数
pytorch实现FLOPs和Params的计算









