From de747065f733ba1edb0345be57412604661cca0d Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期二, 28 十一月 2023 18:12:21 +0800 Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV --- pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mybatis/envm/Deleted.java | 8 ++++++++ pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/fastjson/FastJsonConfig.java | 11 +++++++---- pipIrr-platform/pipIrr-web/pipIrr-web.iml | 4 ++++ pipIrr-platform/pipIrr-common/pom.xml | 6 ++++++ pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mybatis/envm/Disabled.java | 8 ++++++++ pipIrr-platform/pipIrr-mw/pom.xml | 5 ++--- pipIrr-platform/pipIrr-web/pom.xml | 6 ++++++ 7 files changed, 41 insertions(+), 7 deletions(-) diff --git a/pipIrr-platform/pipIrr-common/pom.xml b/pipIrr-platform/pipIrr-common/pom.xml index dac97f0..2b86036 100644 --- a/pipIrr-platform/pipIrr-common/pom.xml +++ b/pipIrr-platform/pipIrr-common/pom.xml @@ -56,6 +56,12 @@ <dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-dataformat-yaml</artifactId> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> </dependency> <!-- api鍦ㄧ嚎鏂囨。 https://springdoc.org/#modules--> diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/fastjson/FastJsonConfig.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/fastjson/FastJsonConfig.java index 22eb799..753420c 100644 --- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/fastjson/FastJsonConfig.java +++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/fastjson/FastJsonConfig.java @@ -6,14 +6,17 @@ import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; -//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; +/** + * 蹇呴』瀹炵幇WebMvcConfigurer鍚﹀垯涓嶅惎浣滅敤锛屽嵆Controller杞琷son鏃朵笉鐢╢astjson + */ @Configuration -public class FastJsonConfig { +public class FastJsonConfig implements WebMvcConfigurer { /** * 閰嶇疆fastjson杈撳嚭鏍煎紡 **/ @@ -29,12 +32,12 @@ JSONWriter.Feature.WriteMapNullValue, //杈撳嚭null鐨刡oolean 涓� false JSONWriter.Feature.WriteNullBooleanAsFalse, - //鎶奓ong鍨嬭緭鍑轰负String + //鎶奓ong鍨嬭緭鍑轰负String锛屽湪pojo鐨勫睘鎬т腑涓�ц缃� //JSONWriter.Feature.WriteLongAsString, //杈撳嚭null鐨刲ist 涓� [] JSONWriter.Feature.WriteNullListAsEmpty, //杈撳嚭null鐨刵umber 涓� 0 - JSONWriter.Feature.WriteNullNumberAsZero, + //JSONWriter.Feature.WriteNullNumberAsZero, //杈撳嚭null瀛楃涓� 涓� "" JSONWriter.Feature.WriteNullStringAsEmpty, //瀵筸ap杩涜鎺掑簭 diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mybatis/envm/Deleted.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mybatis/envm/Deleted.java index 6e073f7..923f23e 100644 --- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mybatis/envm/Deleted.java +++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mybatis/envm/Deleted.java @@ -16,6 +16,14 @@ this.name = name ; } + /** + * 瀹為檯涓婅浆json锛岃Pojo鐨勫搴斿睘鎬� + * @return json + */ +// public String toString(){ +// return "{\"code\":" + this.code + "," + "\"name\":" + this.name + "}" ; +// } + @Override public Byte getCode() { return this.code ; diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mybatis/envm/Disabled.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mybatis/envm/Disabled.java index b16444b..830a561 100644 --- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mybatis/envm/Disabled.java +++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mybatis/envm/Disabled.java @@ -16,6 +16,14 @@ this.name = name ; } + /** + * 瀹為檯涓婅浆json锛岃Pojo鐨勫搴斿睘鎬� + * @return json + */ + //public String toString(){ + // return "{\"code\":" + this.code + "," + "\"name\":" + this.name + "}" ; + //} + @Override public Byte getCode() { return this.code ; diff --git a/pipIrr-platform/pipIrr-mw/pom.xml b/pipIrr-platform/pipIrr-mw/pom.xml index 9ce1ec9..379d653 100644 --- a/pipIrr-platform/pipIrr-mw/pom.xml +++ b/pipIrr-platform/pipIrr-mw/pom.xml @@ -76,9 +76,8 @@ <artifactId>jackson-dataformat-yaml</artifactId> <exclusions> <exclusion> - <!-- 鎺掗櫎鎺変緷璧� --> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> + <groupId>*</groupId> + <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web.iml b/pipIrr-platform/pipIrr-web/pipIrr-web.iml index e468c4f..e880b29 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web.iml +++ b/pipIrr-platform/pipIrr-web/pipIrr-web.iml @@ -22,6 +22,7 @@ <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:3.1.3" level="project" /> <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:3.1.3" level="project" /> <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:2.1.1" level="project" /> + <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.33" level="project" /> <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:3.1.3" level="project" /> <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:10.1.12" level="project" /> <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:10.1.12" level="project" /> @@ -51,6 +52,9 @@ <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:3.1.3" level="project" /> <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:3.1.3" level="project" /> <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:3.1.3" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.15.2" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.15.2" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.15.2" level="project" /> <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2" level="project" /> <orderEntry type="library" name="Maven: io.micrometer:micrometer-observation:1.11.2" level="project" /> <orderEntry type="library" name="Maven: io.micrometer:micrometer-commons:1.11.2" level="project" /> diff --git a/pipIrr-platform/pipIrr-web/pom.xml b/pipIrr-platform/pipIrr-web/pom.xml index abbd0c9..ce539f0 100644 --- a/pipIrr-platform/pipIrr-web/pom.xml +++ b/pipIrr-platform/pipIrr-web/pom.xml @@ -80,6 +80,12 @@ <dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-dataformat-yaml</artifactId> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> </dependency> <!-- 绯荤粺鐩戠 --> -- Gitblit v1.8.0