当前位置:网站首页>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);
}
}
边栏推荐
猜你喜欢

微信小程序开发实战 云音乐

Wechat applets - basics takes you to understand the life cycle of applets (2)

【Try to Hack】Windows系统账户安全

25:第三章:开发通行证服务:8:【注册/登录】接口:接收并校验“手机号和验证码”参数;(重点需要知道【利用redis来暂存数据,获取数据的】的应用场景)(使用到了【@Valid注解】参数校验)

Tencent conference application market was officially launched, with more than 20 applications in the first batch

太湖 “中国健康农产品·手机直播万里行”走进太湖

条件编译

Why must we move from Devops to bizdevops?

小学期,第三场-下午:WEB_xxe

闲鱼难“翻身”
随机推荐
超视频时代的音视频架构建设|Science和英特尔联袂推出“架构师成长计划”第二季
基于slate构建文档编辑器
【ICCV 2019】特征超分检测:Towards Precise Supervision of Feature Super-Resolution for Small Object Detection
解决arm_release_ver of this libmali is ‘g2p0-01eac0‘,rk_so_ver is ‘4‘,libgl1-mesa-dev不会被安装,存在未满足的依赖关系
PHP文件上传小结(乱码,移动失败,权限,显示图片)
[try to hack] windows system account security
Audio and video architecture construction in the super video era | science and Intel jointly launched the second season of "architect growth plan"
SM2246EN+闪迪15131
标配10个安全气囊,奇瑞艾瑞泽8安全防护无死角
matlab 将三角剖分结果保存为STL文件
台湾SSS鑫创SSS1700替代Cmedia CM6533 24bit 96KHZ USB音频编解码芯片
文件包含&条件竞争
yolo 目标检测
Primary school, session 3 - afternoon: Web_ xxe
Data intelligence - dtcc2022! China database technology conference is about to open
Perl转换文件的编码类型
MySQL master-slave synchronization
6-1漏洞利用-FTP漏洞利用
Taiwan SSS Xinchuang sss1700 replaces cmedia cm6533 24bit 96KHz USB audio codec chip
Build document editor based on slate