模块调整

This commit is contained in:
Shikong 2023-04-25 14:50:37 +08:00
parent e81679a233
commit 34b1d06ec5
8 changed files with 66 additions and 3 deletions

View File

@ -9,6 +9,7 @@
<outputRelativeToContentRoot value="true" />
<module name="kafka-01-producer" />
<module name="kafka-01-common" />
<module name="common" />
<module name="provider" />
<module name="consumer" />
<module name="kafka-01-consumer" />

View File

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/common/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/common/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/kafka-01/kafka-01-common/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/kafka-01/kafka-01-common/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/kafka-01/kafka-01-consumer/src/main/java" charset="UTF-8" />

35
common/pom.xml Normal file
View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.skcks.study.springcloud</groupId>
<artifactId>spring-cloud-study</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>common</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!--Jackson包-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -46,5 +46,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>cn.skcks.study.springcloud</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

19
pom.xml
View File

@ -15,6 +15,7 @@
<modules>
<module>nacos-01</module>
<module>kafka-01</module>
<module>common</module>
</modules>
<properties>
@ -23,6 +24,7 @@
<spring-cloud.version>2021.0.6</spring-cloud.version>
<spring-cloud-alibaba.version>2021.1</spring-cloud-alibaba.version>
<lombok.version>1.18.26</lombok.version>
<jackson.version>2.15.0</jackson.version>
</properties>
<dependencyManagement>
@ -59,6 +61,23 @@
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<!--Jackson包-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>