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} +