<!--hutool-->
<dependency>
<groupId></groupId>
<artifactId>hutool-all</artifactId>
<version>5.7.17</version>
</dependency>
1.将User对象(多)转为UserDTO对象(少)
UserDTO userDTO = (user, );
数据转为UserDTO
UserDTO userDTO = (userMap, new UserDTO(), false);
3.将bean转为Map
Map<String, Object> userMap = (userDTO, new HashMap<>());
4.将对象转为json
().set(key, (redisData));
5.将json转为对象
String json = ().get(key);
return (json, type);