From 0a116c5ae9595e43d1c6220dcb4b56201d4518d8 Mon Sep 17 00:00:00 2001 From: yulongchao Date: Wed, 4 Sep 2024 15:29:19 +0800 Subject: [PATCH 1/2] jsonconfig --- .../SerializerAutoConfiguration.java | 39 +++++++------------ .../main/resources/META-INF/spring.factories | 4 +- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/caf-boot-starters/caf-boot-starter-base/src/main/java/io/iec/edp/caf/base/config/serializer/SerializerAutoConfiguration.java b/caf-boot-starters/caf-boot-starter-base/src/main/java/io/iec/edp/caf/base/config/serializer/SerializerAutoConfiguration.java index 9049e63f..c84f52d5 100644 --- a/caf-boot-starters/caf-boot-starter-base/src/main/java/io/iec/edp/caf/base/config/serializer/SerializerAutoConfiguration.java +++ b/caf-boot-starters/caf-boot-starter-base/src/main/java/io/iec/edp/caf/base/config/serializer/SerializerAutoConfiguration.java @@ -1,26 +1,13 @@ -//package io.iec.edp.caf.base.config.serializer; -// -//import io.iec.edp.caf.commons.core.api.CafSerialization; -//import io.iec.edp.caf.commons.exception.config.ExceptionHandlingSettings; -//import io.iec.edp.caf.commons.exception.entity.ExceptionHandlerInfo; -//import io.iec.edp.caf.commons.exception.entity.ExceptionPolicyInfo; -//import io.iec.edp.caf.commons.exception.service.CafExceptionHandler; -//import org.springframework.context.annotation.Bean; -//import org.springframework.context.annotation.Configuration; -// -//import java.util.Iterator; -//import java.util.List; -//import java.util.ServiceLoader; -// -//@Configuration(proxyBeanMethods=false) -//public class SerializerAutoConfiguration { -// static { -// ServiceLoader operations = ServiceLoader.load(CafSerialization.class); -// -// Iterator iterator = operations.iterator(); -// while (iterator.hasNext()) { -// CafSerialization operation = iterator.next(); -// SerializerFactoryWrapper.registerAppSerialization(operation.getId(),operation.getClass()); -// } -// } -//} +package io.iec.edp.caf.base.config.serializer; + +import io.iec.edp.caf.commons.core.config.JsonConfigurationProperties; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +@Configuration(proxyBeanMethods=false) +@EnableConfigurationProperties({ + JsonConfigurationProperties.class +}) +public class SerializerAutoConfiguration { + +} diff --git a/caf-boot-starters/caf-boot-starter-base/src/main/resources/META-INF/spring.factories b/caf-boot-starters/caf-boot-starter-base/src/main/resources/META-INF/spring.factories index 4cfaf357..b6bb4083 100644 --- a/caf-boot-starters/caf-boot-starter-base/src/main/resources/META-INF/spring.factories +++ b/caf-boot-starters/caf-boot-starter-base/src/main/resources/META-INF/spring.factories @@ -3,4 +3,6 @@ org.springframework.context.ApplicationListener=\ io.iec.edp.caf.base.config.runtimes.EnvironmentPreparedListener org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ -io.iec.edp.caf.base.config.exception.ExceptionAutoConfiguration +io.iec.edp.caf.base.config.exception.ExceptionAutoConfiguration\ +io.iec.edp.caf.base.config.serializer.SerializerAutoConfiguration + -- Gitee From 1aa05030954897ba7804c1cd6ab80890f2cb2973 Mon Sep 17 00:00:00 2001 From: yulongchao Date: Wed, 4 Sep 2024 16:00:38 +0800 Subject: [PATCH 2/2] json --- .../src/main/resources/META-INF/spring.factories | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caf-boot-starters/caf-boot-starter-base/src/main/resources/META-INF/spring.factories b/caf-boot-starters/caf-boot-starter-base/src/main/resources/META-INF/spring.factories index b6bb4083..02325ea7 100644 --- a/caf-boot-starters/caf-boot-starter-base/src/main/resources/META-INF/spring.factories +++ b/caf-boot-starters/caf-boot-starter-base/src/main/resources/META-INF/spring.factories @@ -3,6 +3,6 @@ org.springframework.context.ApplicationListener=\ io.iec.edp.caf.base.config.runtimes.EnvironmentPreparedListener org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ -io.iec.edp.caf.base.config.exception.ExceptionAutoConfiguration\ +io.iec.edp.caf.base.config.exception.ExceptionAutoConfiguration,\ io.iec.edp.caf.base.config.serializer.SerializerAutoConfiguration -- Gitee