mirror of
https://gitee.com/jzsw-it/yexuejc-base.git
synced 2025-06-06 22:04:04 +08:00
1.4.5
This commit is contained in:
parent
8741562463
commit
6ff859b4fb
@ -23,7 +23,7 @@ gitee:https://gitee.com/jzsw-it/yexuejc-base
|
||||
|
||||
|
||||
### 使用
|
||||
>yexuejc.base.version=1.4.1
|
||||
>yexuejc.base.version=1.4.5
|
||||
|
||||
pom.xml
|
||||
```
|
||||
|
@ -1,6 +1,12 @@
|
||||
yexuejc-base 更新记录
|
||||
------------------
|
||||
|
||||
#### version :1.4.5
|
||||
**time:2022-5-9 13:37:31** <br/>
|
||||
**branch:** master <br/>
|
||||
**update:** <br/>
|
||||
>1. 扩展FileUtil,优化Base64的包
|
||||
#
|
||||
#### version :1.4.4
|
||||
**time:2021-4-24 00:41:31** <br/>
|
||||
**branch:** master <br/>
|
||||
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>top.yexuejc</groupId>
|
||||
<artifactId>yexuejc-base</artifactId>
|
||||
<version>1.4.4</version>
|
||||
<version>1.4.5</version>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<url>https://github.com/yexuejc/yexuejc-base</url>
|
||||
|
36
src/test/java/com/yexuejc/base/util/JsonUtilTest.java
Normal file
36
src/test/java/com/yexuejc/base/util/JsonUtilTest.java
Normal file
@ -0,0 +1,36 @@
|
||||
package com.yexuejc.base.util;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class JsonUtilTest {
|
||||
public static void main(String[] args) {
|
||||
TestA testA = new TestA("张三", 1, false);
|
||||
System.out.println(JsonUtil.json2Obj(JsonUtil.obj2Json(testA), Map.class));
|
||||
|
||||
List<TestA> list = new ArrayList<>();
|
||||
list.add(testA);
|
||||
list.add(testA);
|
||||
list.add(testA);
|
||||
System.out.println(JsonUtil.json2Obj(JsonUtil.obj2Json(list), List.class,TestA.class));
|
||||
}
|
||||
|
||||
static class TestA implements Serializable {
|
||||
public String name;
|
||||
public Integer id;
|
||||
public Boolean sex;
|
||||
|
||||
public TestA() {
|
||||
}
|
||||
|
||||
public TestA(String name, Integer id, Boolean sex) {
|
||||
this.name = name;
|
||||
this.id = id;
|
||||
this.sex = sex;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user