spring redis坑爹的BoundListOperations

当使用BoundListOperations的类有父类的时候,是不能得到父类的字段的。

我的操作方式

@Autowired
private RedisTemplate<String, UserSecure> template;



String key = PREFIX_USER + user.getUserName();
BoundListOperations<String,UserSecure> boundHashOperations2 =template.boundListOps(key);



这里的UserSecure类似继承一个类的,
最后拿的时候,只能拿到这个类本身的字段,父类的字段是拿不到的。

猜你喜欢

转载自huangyunbin.iteye.com/blog/1885926
今日推荐