惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
Jina AI
Jina AI
H
Help Net Security
C
Check Point Blog
aimingoo的专栏
aimingoo的专栏
MyScale Blog
MyScale Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Vercel News
Vercel News
L
LangChain Blog
Recorded Future
Recorded Future
F
Full Disclosure
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
I
InfoQ
GbyAI
GbyAI
B
Blog RSS Feed
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
M
MIT News - Artificial intelligence
爱范儿
爱范儿
V
V2EX
Microsoft Azure Blog
Microsoft Azure Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Y
Y Combinator Blog
B
Blog
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
W
WeLiveSecurity
MongoDB | Blog
MongoDB | Blog
Cloudbric
Cloudbric
N
News and Events Feed by Topic
The Cloudflare Blog
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
D
DataBreaches.Net
博客园 - 【当耐特】
T
Troy Hunt's Blog
V
Visual Studio Blog
V2EX - 技术
V2EX - 技术
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google Online Security Blog
Google Online Security Blog
The GitHub Blog
The GitHub Blog

博客园 - 王育东

canal-client无法获取数据 mysql5.7设置默认编码 Angular No name was provided for external module 'XXX' in output.globals 错误 Angular cli 发布自定义组件 Windows Message ID 常量列表大全 C#中Thread与ThreadPool的比较 HTML元素隐藏和显示 IM服务器架构实现 TCP打洞技术 C# UDP打洞 Entity Framework 4 CodeFirst EFProviderWrapperToolKit 使用 COM ActiveX C++ Builder 十分经典的批处理教程 MVVM-Light模式,在dataGrid的模板下,绑定事件不触发的原因已经服务端排序的实现 ADO.NET Entity Framework 如何输出日志到 log4net (EF, Log4net) Silverlight 发布测试 WCF发布到IIS7问题的解决方案 慢慢的才知道 Javascript在页面加载时的执行顺序 - 王育东 - 博客园
Redis + Shiro + FastJson@Cacheable无法写入缓存
王育东 · 2020-06-05 · via 博客园 - 王育东

加入Shiro框架Redis 注解方式缓存不能工作,如@Cacheable无法写入缓存,原因是所在类在Shiro的自定义Realm类中已经@Autowire了所在类。解决方式,在自定义Realm类中注入所在类时,加入@Lazy使用懒加载的方式。

@Component
public class AuthRealm extends AuthorizingRealm {


  @Autowired
  @Lazy
  private IUserService userService;
  @Autowired
  @Lazy
  private IUserRoleService userRoleService;
  @Autowired
  @Lazy
  private IMenuService menuService;
  @Autowired
  @Lazy
  private IRoleService roleService;
    //....