Browse Source

解决日期json序列化的问题

master
梁超 1 day ago
parent
commit
c60d92e1ce

+ 0
- 1
build.gradle View File

@@ -91,7 +91,6 @@ subprojects {
implementation group: 'cn.com.taiji.common', name: 'gly-common', version: '2.3.10.7'
implementation 'org.springframework.boot:spring-boot-starter-web'
// implementation 'com.alibaba:druid-spring-boot-starter:1.2.8'
implementation group: 'com.alibaba', name: 'fastjson', version: '2.0.4'
implementation 'io.minio:minio:8.4.5'
implementation 'cn.hutool:hutool-all:5.7.12'
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.10.0'

+ 5
- 1
zhywpt-app-forward/src/main/java/cn/com/taiji/forward/config/JsonConfig.java View File

@@ -1,5 +1,6 @@
package cn.com.taiji.forward.config;

import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -12,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

+ 5
- 1
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/config/JsonConfig.java View File

@@ -1,5 +1,6 @@
package cn.com.taiji.iaw.config;

import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -12,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

+ 5
- 1
zhywpt-app-ifmw/src/main/java/cn/com/taiji/ifmw/config/JsonConfig.java View File

@@ -1,5 +1,6 @@
package cn.com.taiji.ifmw.config;

import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -12,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

+ 5
- 1
zhywpt-app-invw/src/main/java/cn/com/taiji/invw/config/JsonConfig.java View File

@@ -1,5 +1,6 @@
package cn.com.taiji.invw.config;

import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -12,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

+ 5
- 1
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/config/JsonConfig.java View File

@@ -1,5 +1,6 @@
package cn.com.taiji.managew.config;

import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -12,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

+ 5
- 1
zhywpt-app-msgw/src/main/java/cn/com/taiji/msgw/config/JsonConfig.java View File

@@ -1,5 +1,6 @@
package cn.com.taiji.msgw.config;

import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -12,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

+ 5
- 1
zhywpt-app-settlew/src/main/java/cn/com/taiji/settlew/config/JsonConfig.java View File

@@ -1,5 +1,6 @@
package cn.com.taiji.settlew.config;

import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -12,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

+ 5
- 1
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/config/JsonConfig.java View File

@@ -1,5 +1,6 @@
package cn.com.taiji.userw.config;

import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -12,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

+ 6
- 1
zhywpt-service-ats/src/main/java/cn/com/taiji/ats/config/JsonConfig.java View File

@@ -1,5 +1,7 @@
package cn.com.taiji.ats.config;

import cn.com.taiji.common.pub.TimeTools;
import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -11,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

+ 6
- 1
zhywpt-service-bls/src/main/java/cn/com/taiji/bls/config/JsonConfig.java View File

@@ -1,5 +1,7 @@
package cn.com.taiji.bls.config;

import cn.com.taiji.common.pub.TimeTools;
import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -11,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

+ 6
- 1
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/config/JsonConfig.java View File

@@ -1,5 +1,7 @@
package cn.com.taiji.ias.config;

import cn.com.taiji.common.pub.TimeTools;
import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -11,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

+ 6
- 1
zhywpt-service-inss/src/main/java/cn/com/taiji/inss/config/JsonConfig.java View File

@@ -1,5 +1,7 @@
package cn.com.taiji.inss.config;

import cn.com.taiji.common.pub.TimeTools;
import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -11,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

+ 6
- 1
zhywpt-service-invs/src/main/java/cn/com/taiji/invs/config/JsonConfig.java View File

@@ -1,5 +1,7 @@
package cn.com.taiji.invs.config;

import cn.com.taiji.common.pub.TimeTools;
import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -11,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

+ 6
- 1
zhywpt-service-ods/src/main/java/cn/com/taiji/ods/config/JsonConfig.java View File

@@ -1,5 +1,7 @@
package cn.com.taiji.ods.config;

import cn.com.taiji.common.pub.TimeTools;
import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -11,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

+ 6
- 1
zhywpt-service-rcs/src/main/java/cn/com/taiji/rcs/config/JsonConfig.java View File

@@ -1,5 +1,7 @@
package cn.com.taiji.rcs.config;

import cn.com.taiji.common.pub.TimeTools;
import cn.com.taiji.common.pub.json.JsonTools;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@@ -11,6 +13,9 @@ import cn.com.taiji.common.pub.json.ObjectMapperBuilder;
public class JsonConfig {
@Bean
public ObjectMapper objectMapper() {
return ObjectMapperBuilder.create().build();
ObjectMapper objectMapper =
ObjectMapperBuilder.create().setLocalDateTimeFormatter(TimeTools.DATE_TIME_FORMATTER).build();
JsonTools.customerMapper(objectMapper);
return objectMapper;
}
}

Loading…
Cancel
Save