Spring Boot整合@Cacheable注解使用 @CacheEvict注解使用

@Cacheable 作用:把方法的返回值添加到 Ehcache 中做缓存 Value 属性:指定一个 Ehcache 配置文件中的缓存策略,如果么有给定 value,name 则 表示使用默认的缓存策略。   只有 key="#pageable的时候,第三次查询,还需要查询数据库   key="#pageable.pageSize"的时候,不需要再次查询。     2 @CacheEvict @
相关文章
相关标签/搜索