redis
二师兄 AI
专注于技术领域创作分享|AI 产品|AI 编程技术|Prompt|MCP
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Spring Cache – KeyGenerator自定义rediskey
1. 概述 在此教程中,我们将演示如何使用 Spring Cache 创建自定义密钥生成器。 2. KeyGenerator 这负责为缓存中的每个数据项生成每个键,这些键将用于在检索时查找数据项。 此处的默认实现是SimpleKeyGenerator –它使用提供的方法参数来生成密钥。这意味着,如果我们有两个使用相同的缓存名称和参数类型集的方法,则很有可能会导致冲突。 它还意味着缓存数据可以由另一...原创 2020-02-24 15:54:42 · 7284 阅读 · 2 评论 -
Mybatis类型转换介绍
1.2 建立TypeHandler 1.2.1 TypeHandler接口 1.2.2 BaseTypeHandler抽象类 1.3 注册TypeHandler 1.4 Mybatis自动获取TypeHandler 1.5 Mybatis中自动注册的TypeHandler转载 2020-02-08 19:03:31 · 534 阅读 · 0 评论 -
spring项目中redis缓存自定义key
自定义key说明 //使用参数id值作为key值 @Cacheable(value = "users", key = "#id") public User find(Integer id) { returnnull; } //使用函数第一个参数作为缓存的key值 @Cacheable(value = "users", key = "#p0...原创 2020-02-06 11:36:49 · 1823 阅读 · 0 评论
分享