4 Commits

Author SHA1 Message Date
4302084b95 Merge pull request 'v0.0.8' (#8) from dev into master
Reviewed-on: #8
2026-03-25 06:48:12 +00:00
Timi
b15090d558 v0.0.8
Some checks failed
CI/CD / build-deploy (pull_request) Failing after 1m1s
2026-03-25 14:47:46 +08:00
4f8054dc94 Merge pull request 'v0.0.7' (#7) from dev into master
Reviewed-on: #7
2026-03-17 08:40:14 +00:00
Timi
26f34fda40 v0.0.7
All checks were successful
CI/CD / build-deploy (pull_request) Successful in 28s
2026-03-17 16:39:55 +08:00
2 changed files with 11 additions and 2 deletions

View File

@@ -6,7 +6,7 @@
<groupId>com.imyeyu.network</groupId>
<artifactId>timi-network</artifactId>
<version>0.0.6</version>
<version>0.0.8</version>
<packaging>jar</packaging>
<properties>
@@ -92,7 +92,7 @@
<dependency>
<groupId>com.imyeyu.io</groupId>
<artifactId>timi-io</artifactId>
<version>0.0.2</version>
<version>0.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>

View File

@@ -1,7 +1,9 @@
package com.imyeyu.network;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JacksonException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
@@ -12,6 +14,7 @@ import org.apache.hc.core5.http.HttpEntity;
import java.io.IOException;
import java.lang.reflect.Type;
import java.text.SimpleDateFormat;
/**
* 基于 Jackson 的请求封装。
@@ -23,6 +26,12 @@ public class JacksonRequest extends CommonRequest {
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
static {
OBJECT_MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
OBJECT_MAPPER.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
OBJECT_MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL);
}
private ObjectMapper objectMapper = null;
protected JacksonRequest(Request request) {