当前位置:网站首页>[party benefits] jsonobject to string, leave blank
[party benefits] jsonobject to string, leave blank
2022-07-01 03:39:00 【Three person studio】
The same problem :
Redis Leave an empty field and take it out
JSONObject To String Leave blank fields when typing
take String Type to JSONObject Leave blank fields when typing
reason
Object The type and JSONObject Type to String When type , Empty fields are automatically ignored .
Solution
Use class Entity classes are output as templates , take String Type to entity type
Need to introduce hutool
import cn.hutool.json.JSONUtil;
...
UserInfo userinfo = JSONUtil.toBean(String.valueOf(redisUtil.get(UserToken)),UserInfo.class)
UserInfo.java
import lombok.Data;
// Virtual entity class that outputs user information
@Data
public class UserInfo {
private String id;
private String username;
private String realname;
}
Then through the entity class get and set Just output .
边栏推荐
- 完全背包问题
- AfxMessageBox和MessageBox的用法
- 10、Scanner.next() 无法读取空格/indexOf -1
- Avalanche problem and the use of sentinel
- Gorilla/mux framework (RK boot): RPC error code design
- [deep learning] activation function (sigmoid, etc.), forward propagation, back propagation and gradient optimization; optimizer. zero_ grad(), loss. backward(), optimizer. Function and principle of st
- Edlines: a real time line segment detector with a false detection control
- [nine day training] content III of the problem solution of leetcode question brushing Report
- RSN:Learning to Exploit Long-term Relational Dependencies in Knowledge Graphs
- [深度学习]激活函数(Sigmoid等)、前向传播、反向传播和梯度优化;optimizer.zero_grad(), loss.backward(), optimizer.step()的作用及原理
猜你喜欢

Blueprism registration, download and install -rpa Chapter 1

Download and installation configuration of cygwin

实现pow(x,n)函数
![[nine day training] content III of the problem solution of leetcode question brushing Report](/img/7e/1e76181e56ef7feb083f9662df71c7.jpg)
[nine day training] content III of the problem solution of leetcode question brushing Report
![[deep learning] activation function (sigmoid, etc.), forward propagation, back propagation and gradient optimization; optimizer. zero_ grad(), loss. backward(), optimizer. Function and principle of st](/img/9f/187ca83be1b88630a6c6fbfb0620ed.png)
[deep learning] activation function (sigmoid, etc.), forward propagation, back propagation and gradient optimization; optimizer. zero_ grad(), loss. backward(), optimizer. Function and principle of st

The value of the second servo encoder is linked to the NC virtual axis of Beifu PLC for display

完全背包问题

快速筛选打卡时间日期等数据:EXCEL筛选查找某一时间点是否在某一时间段内

Home online shopping project

Depth first traversal of C implementation Diagram -- non recursive code
随机推荐
How to display scrollbars on the right side of the background system and how to solve the problem of double scrollbars
Test function in pychram
E15 solution for cx5120 controlling Huichuan is620n servo error
Cygwin的下载和安装配置
JS daily development tips (continuous update)
Overview of EtherCAT principle
Avalanche problem and the use of sentinel
Addition without addition, subtraction, multiplication and division
ECMAScript 6.0
md5sum操作
10、Scanner. Next() cannot read spaces /indexof -1
The method to measure the similarity of two vectors: cosine similarity, pytorch calculate cosine similarity: torch nn. CosineSimilarity(dim=1, eps=1e-08)
FCN全卷積網絡理解及代碼實現(來自pytorch官方實現)
The difference between MFC for static libraries and MFC for shared libraries
Are you still wasting brain cells for self-study? This interview note is definitely the ceiling of station C
Ridge regression and lasso regression
Leetcode 1818 absolute value, sorting, dichotomy, maximum value
Basic concept and classification of sorting
Cookie&Session
Appium自动化测试基础 — APPium基本原理