首页>代码>Spring Cache标注实现对Redis缓存数据的增删改查的简单实例>/springboot-caching-redis/src/main/java/com/hellokoding/springboot/caching/configuration/CustomCacheErrorHandler.java
package com.hellokoding.springboot.caching.configuration; import lombok.extern.slf4j.Slf4j; import org.springframework.cache.Cache; import org.springframework.cache.interceptor.CacheErrorHandler; @Slf4j public class CustomCacheErrorHandler implements CacheErrorHandler { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object o) { log.error(e.getMessage(), e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object o, Object o1) { log.error(e.getMessage(), e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object o) { log.error(e.getMessage(), e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.error(e.getMessage(), e); } }
最近下载更多
十月* LV1
2022年9月22日
yinyun1985 LV14
2022年6月14日
zhenghongixin4065 LV9
2022年4月3日
breakCY LV15
2022年3月21日
xgjdmy_ccb LV11
2021年11月18日
阿昌先生 LV13
2021年6月28日
最代码官方 LV167
2020年12月18日
杰桑awa LV6
2020年10月30日
a1453370401 LV10
2020年10月25日
sweetlove LV17
2020年10月24日
最近浏览更多
flygrass LV12
3月28日
内心向阳 LV4
2023年11月8日
四季镇 LV9
2023年10月11日
644106 LV8
2023年6月8日
胡明杨
2023年5月29日
暂无贡献等级
youwuzuichen LV10
2023年3月27日
2237851964 LV1
2023年3月12日
banerwu LV3
2023年1月3日
qwertyuiopzxc LV1
2022年10月14日
周粥周 LV3
2022年10月12日