From 34b1d06ec5196b7025d3fc8a3aa54998a545b41f Mon Sep 17 00:00:00 2001
From: Shikong <919411476@qq.com>
Date: Tue, 25 Apr 2023 14:50:37 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9D=97=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/compiler.xml | 1 +
.idea/encodings.xml | 2 ++
common/pom.xml | 35 +++++++++++++++++++
.../study/springcloud}/utils/JsonUtils.java | 2 +-
.../producer/controller/SimpleController.java | 2 +-
.../kafka/tests/KafkaConfigTest.java | 2 +-
kafka-01/pom.xml | 6 ++++
pom.xml | 19 ++++++++++
8 files changed, 66 insertions(+), 3 deletions(-)
create mode 100644 common/pom.xml
rename {kafka-01/kafka-01-common/src/main/java/cn/skcks/study/springcloud/kafka/common => common/src/main/java/cn/skcks/study/springcloud}/utils/JsonUtils.java (98%)
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 432bb89..781c3f8 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -9,6 +9,7 @@
+
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 887371d..a39078e 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,6 +1,8 @@
+
+
diff --git a/common/pom.xml b/common/pom.xml
new file mode 100644
index 0000000..26f5085
--- /dev/null
+++ b/common/pom.xml
@@ -0,0 +1,35 @@
+
+
+ 4.0.0
+
+ cn.skcks.study.springcloud
+ spring-cloud-study
+ 1.0-SNAPSHOT
+
+
+ common
+
+
+ 8
+ 8
+ UTF-8
+
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+
+
+
diff --git a/kafka-01/kafka-01-common/src/main/java/cn/skcks/study/springcloud/kafka/common/utils/JsonUtils.java b/common/src/main/java/cn/skcks/study/springcloud/utils/JsonUtils.java
similarity index 98%
rename from kafka-01/kafka-01-common/src/main/java/cn/skcks/study/springcloud/kafka/common/utils/JsonUtils.java
rename to common/src/main/java/cn/skcks/study/springcloud/utils/JsonUtils.java
index 05b52c2..56cdd75 100644
--- a/kafka-01/kafka-01-common/src/main/java/cn/skcks/study/springcloud/kafka/common/utils/JsonUtils.java
+++ b/common/src/main/java/cn/skcks/study/springcloud/utils/JsonUtils.java
@@ -1,4 +1,4 @@
-package cn.skcks.study.springcloud.kafka.common.utils;
+package cn.skcks.study.springcloud.utils;
import com.fasterxml.jackson.core.json.JsonReadFeature;
import com.fasterxml.jackson.core.type.TypeReference;
diff --git a/kafka-01/kafka-01-producer/src/main/java/cn/skcks/study/springcloud/kafka/producer/controller/SimpleController.java b/kafka-01/kafka-01-producer/src/main/java/cn/skcks/study/springcloud/kafka/producer/controller/SimpleController.java
index d5cf76d..1d4d318 100644
--- a/kafka-01/kafka-01-producer/src/main/java/cn/skcks/study/springcloud/kafka/producer/controller/SimpleController.java
+++ b/kafka-01/kafka-01-producer/src/main/java/cn/skcks/study/springcloud/kafka/producer/controller/SimpleController.java
@@ -1,7 +1,7 @@
package cn.skcks.study.springcloud.kafka.producer.controller;
import cn.skcks.study.springcloud.kafka.common.model.dto.Message;
-import cn.skcks.study.springcloud.kafka.common.utils.JsonUtils;
+import cn.skcks.study.springcloud.utils.JsonUtils;
import com.fasterxml.jackson.core.JsonProcessingException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
diff --git a/kafka-01/kafka-01-producer/src/test/java/cn/skcks/study/springcloud/kafka/tests/KafkaConfigTest.java b/kafka-01/kafka-01-producer/src/test/java/cn/skcks/study/springcloud/kafka/tests/KafkaConfigTest.java
index b767bae..bfd355f 100644
--- a/kafka-01/kafka-01-producer/src/test/java/cn/skcks/study/springcloud/kafka/tests/KafkaConfigTest.java
+++ b/kafka-01/kafka-01-producer/src/test/java/cn/skcks/study/springcloud/kafka/tests/KafkaConfigTest.java
@@ -1,7 +1,7 @@
package cn.skcks.study.springcloud.kafka.tests;
import cn.skcks.study.springcloud.kafka.TestApplication;
-import cn.skcks.study.springcloud.kafka.common.utils.JsonUtils;
+import cn.skcks.study.springcloud.utils.JsonUtils;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.admin.AdminClient;
diff --git a/kafka-01/pom.xml b/kafka-01/pom.xml
index f563891..263851b 100644
--- a/kafka-01/pom.xml
+++ b/kafka-01/pom.xml
@@ -46,5 +46,11 @@
org.springframework.boot
spring-boot-starter-test
+
+
+ cn.skcks.study.springcloud
+ common
+ ${project.version}
+
diff --git a/pom.xml b/pom.xml
index abdb0cd..f2730d5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,6 +15,7 @@
nacos-01
kafka-01
+ common
@@ -23,6 +24,7 @@
2021.0.6
2021.1
1.18.26
+ 2.15.0
@@ -59,6 +61,23 @@
${lombok.version}
provided
+
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ ${jackson.version}
+