mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
修复时间戳转Bean时异常问题
This commit is contained in:
parent
9bb370c476
commit
3fc8da755f
@ -24,6 +24,7 @@
|
|||||||
* 【db 】 修复嵌套SQL中order by子句错误截断问题(issue#I89RXV@Gitee)
|
* 【db 】 修复嵌套SQL中order by子句错误截断问题(issue#I89RXV@Gitee)
|
||||||
* 【http 】 修复graalvm编译后,未读取Content-Length可能导致的读取时间过长问题(issue#I6Q30X@Gitee)
|
* 【http 】 修复graalvm编译后,未读取Content-Length可能导致的读取时间过长问题(issue#I6Q30X@Gitee)
|
||||||
* 【core 】 修复JavaSourceCompiler.addSource目录处理错误问题(issue#3425@Github)
|
* 【core 】 修复JavaSourceCompiler.addSource目录处理错误问题(issue#3425@Github)
|
||||||
|
* 【core 】 修复时间戳转Bean时异常问题(issue#I8NMP7@Gitee)
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
# 5.8.23(2023-11-12)
|
# 5.8.23(2023-11-12)
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
package cn.hutool.json;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import org.junit.Assert;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class IssueI8NMP7Test {
|
||||||
|
@Test
|
||||||
|
public void toBeanTest() {
|
||||||
|
final String jsonString = "{\"enableTime\":\"1702262524444\"}";
|
||||||
|
final DemoModel bean = JSONUtil.toBean(jsonString, JSONConfig.create(), DemoModel.class);
|
||||||
|
Assert.assertNotNull(bean.getEnableTime());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ToString
|
||||||
|
static class DemoModel{
|
||||||
|
private Date enableTime;
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user