alibaba / jetcache

JetCache is a Java cache framework.
Apache License 2.0
5.14k stars 1.06k forks source link

Cache operation aborted because can't find @Cached definition com.alicp.jetcache.CacheConfigException: can't find @Cached definition with area=default name=? #676

Open PatrickStar12138 opened 2 years ago

PatrickStar12138 commented 2 years ago

查询方法上的注解 @Cached(name = "AAAAA",key = "'AAAAA'",expire = 180, cacheType = CacheType.REMOTE)

另外一个方法上的缓存失效 @CacheInvalidate(name = "AAAAA",key = "'AAAAA'")

报错: can't find @Cached definition with area=default name=AAAAA, specified in 某个方法

leechedan commented 2 years ago

你这个是在同一个进程里面吗?或者@cached的包范围没有被扫描到,确实会报这个异常

查询方法上的注解 @cached(name = "AAAAA",key = "'AAAAA'",expire = 180, cacheType = CacheType.REMOTE)

另外一个方法上的缓存失效 @CacheInvalidate(name = "AAAAA",key = "'AAAAA'")

报错: can't find @cached definition with area=default name=AAAAA, specified in 某个方法