v0.0.7
All checks were successful
CI/CD / build-deploy (pull_request) Successful in 28s

This commit is contained in:
Timi
2026-03-17 16:39:55 +08:00
parent 25f431c009
commit 26f34fda40
2 changed files with 10 additions and 1 deletions

View File

@@ -6,7 +6,7 @@
<groupId>com.imyeyu.network</groupId>
<artifactId>timi-network</artifactId>
<version>0.0.6</version>
<version>0.0.7</version>
<packaging>jar</packaging>
<properties>

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) {