如截圖所示,如果要緩存的數據是String類型,能正常放進去
?
但是如果是個非String類型,比方說是個List類型,它就會報錯,java.util.List?cannot be cast to java.lang.String
debug了一下是在org.springframework.cache.interceptor.AbstractCacheInvoker里的doPut方法里報的RunTimeException,如圖
?這個類型轉換不成功,是哪里配置不對么?實在找不出來具體的報錯地方是哪里,有人知道的請幫忙看看。。。。
添加回答
舉報
0/150
提交
取消