500 Star 6.2K Fork 1.7K

GVPanji-plus / AJ-Captcha

 / 详情

springboot热部署的时候redis工具类被实例两次?

已完成
创建于  
2021-07-17 20:41

Error creating bean with name 'AjCaptchaCacheService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'redis12345678' is expected to be of type 'com.envy.priority.utils.Redis12345678' but was actually of type 'com.envy.priority.utils.Redis12345678'
代码

评论 (2)

serendipity 创建了任务
serendipity 关联仓库设置为anji-plus/AJ-Captcha
展开全部操作日志

Autowired也一样 不知道什么原因 :joy:

redis12345678是什么,你在哪定义的bean,错误提示bean重复。
就用StringRedisTemplate不行吗,非得又封装一层,复杂化 :grinning:

Raod 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
2196603 s7c 1610360037
JavaScript
1
https://gitee.com/anji-plus/captcha.git
git@gitee.com:anji-plus/captcha.git
anji-plus
captcha
AJ-Captcha

搜索帮助