赞
踩
- <!--hutool-->
- <dependency>
- <groupId>cn.hutool</groupId>
- <artifactId>hutool-all</artifactId>
- <version>5.7.17</version>
- </dependency>
UserDTO userDTO = BeanUtil.copyProperties(user, UserDTO.class);
UserDTO userDTO = BeanUtil.fillBeanWithMap(userMap, new UserDTO(), false);
Map<String, Object> userMap = BeanUtil.beanToMap(userDTO, new HashMap<>());
stringRedisTemplate.opsForValue().set(key, JSONUtil.toJsonStr(redisData));
- String json = stringRedisTemplate.opsForValue().get(key);
- return JSONUtil.toBean(json, type);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。