今日份学习: Spring中使用AOP并实现redis缓存?

笔记

在Spring中如何使用AOP?

  1. Spring是如何切换JDK动态代理CGLIB的?
  • spring.aop.proxy-target-class=true (在下方第二个链接中,原生doc中提到过)
  1. @Aspect生命切面
  • @Before
  • @After
  • @Around

Redis

  1. 广泛使用的内存缓存
  2. 常见的数据结构:
  • String
  • List
  • Set
  • Hash
  • ZSet
  1. Redis为什么快?
  • 完全基于内存
  • 优秀的数据结构设计
  • 单一线程,避免上下文切换开销
  • 事件驱动,非阻塞

浏览的一些学习资料

Spring Boot中使用AOP统一处理Web请求日志
Proxying mechanisms: 代理机制(spring doc)
Aspect Oriented Programming with Spring: 使用AOP进行面向切面编程(spring doc)

猜你喜欢

转载自www.cnblogs.com/pipemm/p/12273126.html