4 Commits

Author SHA1 Message Date
f4c1f42a0b release: 1.0.3 2025-04-12 04:24:34 +08:00
e7e5a51718 chore: 更新依赖 2025-04-12 04:24:01 +08:00
9ab9d45a53 chore: 添加 TODO 事项:待修复测试用例 PagingAndSortingQueryParamsTests#testGson 在 JDK17 执行失败的问题
该用例在 JDK17 环境下使用 Gson 进行系列化时,报 `com.google.gson.JsonIOException: Failed making field 'java.time.LocalDateTime#date' accessible; either increase its visibility or write a custom TypeAdapter for its declaring type`。

See: https://github.com/google/gson/blob/main/Troubleshooting.md#reflection-inaccessible
Co-authored-by: ZhouXY108 <luquanlion@outlook.com>
Co-committed-by: ZhouXY108 <luquanlion@outlook.com>
2025-04-12 04:11:51 +08:00
a901f3231d docs: fix param name 2025-04-11 14:47:49 +08:00
3 changed files with 8 additions and 7 deletions

12
pom.xml
View File

@@ -6,7 +6,7 @@
<groupId>xyz.zhouxy.plusone</groupId>
<artifactId>plusone-commons</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
<properties>
<!-- Basic properties -->
@@ -16,18 +16,18 @@
<maven.compiler.target>1.8</maven.compiler.target>
<!-- Versions of compile dependencies -->
<guava.version>33.4.0-jre</guava.version>
<joda-time.version>2.13.0</joda-time.version>
<guava.version>33.4.2-jre</guava.version>
<joda-time.version>2.14.0</joda-time.version>
<!-- Versions of test dependencies -->
<commons-lang3.version>3.17.0</commons-lang3.version>
<logback.version>1.2.13</logback.version>
<junit.version>5.11.4</junit.version>
<junit.version>5.12.1</junit.version>
<lombok.version>1.18.36</lombok.version>
<hutool.version>5.8.35</hutool.version>
<hutool.version>5.8.37</hutool.version>
<mybatis.version>3.5.19</mybatis.version>
<h2.version>2.2.224</h2.version>
<jackson.version>2.18.2</jackson.version>
<jackson.version>2.18.3</jackson.version>
<gson.version>2.12.1</gson.version>
</properties>

View File

@@ -184,7 +184,7 @@ public class DateTimeTools {
/**
* 使用指定时区,将 {@link LocalDateTime} 对象转换为 {@link Instant} 对象
*
* @param LocalDateTime {@link LocalDateTime} 对象
* @param localDateTime {@link LocalDateTime} 对象
* @param zone 时区
* @return {@link Instant} 对象
*/

View File

@@ -212,6 +212,7 @@ public class PagingAndSortingQueryParamsTests {
List<AccountVO> list = accountQueries.queryAccountList(params, pagingParams);
long count = accountQueries.countAccount(params);
PageResult<AccountVO> accountPageResult = PageResult.of(list, count);
// TODO [修复] 从 JDK 17 开始,也允许使用反射访问内部字段,所以这里会报错。参考 https://github.com/google/gson/blob/main/Troubleshooting.md#reflection-inaccessible
log.info(gson.toJson(accountPageResult));
assertEquals(Lists.newArrayList(