我將一個(gè)對象保存到redis中,再取出來時(shí),竟然提示java.lang.ClassCastException: com.weina.entity.po.CommonUser cannot be cast to com.weina.entity.po.CommonUser前后明明同一個(gè)對象,為何不能轉(zhuǎn)呢?這種奇怪的錯(cuò)還是第一次見,有大佬能指點(diǎn)一下嘛?我用Object對象接收從redis中取出的對象,打斷點(diǎn)調(diào)試時(shí),取出的對象完全和我的CommonUser一致,竟然不能轉(zhuǎn)。debug代碼:
redis保存的對象,再取出來,竟然不能轉(zhuǎn)化為原對象?
慕田峪9158850
2019-04-27 22:19:04