Spring boot —— 创建 parent 工程
?? ??? ??? ?</dependency>
?? ??? ?</dependencies>
?? ?</dependencyManagement>
<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>cc.chco</groupId>
<artifactId>chco-parent</artifactId>
<version>0.1.0</version>
<packaging>pom</packaging>
<name>chco</name>
<url>http://www.chco.cc</url>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
</parent>
<modules>
<module>chco-portal</module>
<module>chco-eureka</module>
</modules>
<properties>
<spring-cloud.version>Edgware.SR1</spring-cloud.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<druid.version>1.1.10</druid.version>
<mybatisplus.version>2.1.9</mybatisplus.version>
<mybatisplus.spring.boot.version>1.0.5</mybatisplus.spring.boot.version>
<mssql.version>4.0</mssql.version>
<oracle.version>11.2.0.3</oracle.version>
<commons.lang.version>2.6</commons.lang.version>
<mybatis.spring.boot.version>1.3.0</m
ybatis.spring.boot.version>
<commons.fileupload.version>1.3.1</commons.fileupload.version>
<fastjson.version>1.2.45</fastjson.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis.spring.boot.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
方式二
引入依赖:
?? ??? ?<dependency>
?? ??? ??? ??? ?<groupId>org.springframework.boot</groupId>
?? ??? ??? ??? ?<artifactId>spring-boot-dependencies</artifactId>
?? ??? ??? ??? ?<version>2.0.6.RELEASE</version>
?? ??? ??? ??? ?<type>pom</type>
?? ??? ??? ??? ?<scope>import</scope>
?? ??? ??? ?</dependency>
?? ??? ??? ?<dependency>
?? ??? ??? ??? ?<groupId>org.springframework.cloud</groupId>
?? ??? ??? ??? ?<artifactId>spring-cloud-dependencies</artifactId>
?? ??? ??? ??? ?<version>Finchley.SR2</version>
?? ??? ??? ??? ?<type>pom</type>
?? ??? ??? ??? ?<scope>import</scope>
?? ??? ??? ?</dependency>
<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>cn.silucaihong</groupId>
<artifactId>silkroad</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<name>silkroad</name>
<description>父项目,用于统一执行 package 等 Maven 命令</description>
<modules>
<module>silkroad-scheduling-api</module>
<module>silkroad-scheduling-feign</module>
<module>silkroad-scheduling-service</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<java.version>1.8</java.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<fastjson.version>1.2.45</fastjson.version>
<commons-beanutils.version>1.9.3</commons-beanutils.version>
</properties>
评论