随笔分类 -  设计模式

摘要:缓存设计模式 缓存热点数据, 缩短调用链 旁路缓存 适用于强一致性 写请求 -> 更新DB, 并删除cache 读请求 -> 先查cache, miss后再查DB并写回 @Service public class UserService{ @Autowired private UserDAO use 阅读全文
posted @ 2022-09-11 01:08 Blazer96 阅读(52) 评论(0) 推荐(0) 编辑
摘要:涉及到的模式 工厂设计模式 : Spring使用工厂模式通过 BeanFactory、ApplicationContext 创建 bean 对象。 代理设计模式 : Spring AOP 功能的实现。 单例设计模式 : Spring 中的 Bean 默认都是单例的。 模板方法模式 : Spring 阅读全文
posted @ 2022-08-20 19:30 Blazer96 阅读(43) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示