前期准备:
- 开发工具:idea
- jdk:1.8
- zookeeper:3.4.14
- maven:3.6.1
项目采用“父子项目结构”
edu_parent父模块pom.xml文件:
<?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>
<groupId>com.edu</groupId>
<artifactId>edu_parent</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
<module>edu_auth_consumer</module>
<module>edu_auth_api</module>
<module>edu_auth_dubbo</module>
<module>edu_auth_dubbo2</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-boot.version>2.0.1.RELEASE</spring-boot.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.edu</groupId>
<artifactId>edu_auth_dubbo</artifactId>
<version>${
project.version}</version>
</dependency>
<dependency>
<groupId>com.edu</groupId>
<artifactId>edu_auth_consumer</artifactId>
<version>${
project.version}</version>
</dependency