用springcache,出现key为null,求助什么原因啊,找不到资料

@Cacheable(value="redisCache")
List selectContentByCategoryId(@Param("cid") Long categoryId);

严重: Servlet.service() for servlet [taotao-facadeweb] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalArgumentException: Null key returned for cache operation (maybe you are using named params on classes without debug info?) CacheableOperation[public abstract java.util.List com.taotao.mapper.TbContentMapper.selectContentByCategoryId(java.lang.Long)] caches=[redisCache] | key='#categoryId' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless=''] with root cause
java.lang.IllegalArgumentException: Null key returned for cache operation (maybe you are using named params on classes without debug info?) CacheableOperation[public abstract java.util.List com.taotao.mapper.TbContentMapper.selectContentByCategoryId(java.lang.Long)] caches=[redisCache] | key='#categoryId' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless=''
at org.springframework.cache.interceptor.CacheAspectSupport.generateKey(CacheAspectSupport.java:493)


Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
    立即提问
    相关内容推荐