maven groupId分组名称,artifactId项目名称,统一pom.xml设置


项目结构

 

 1     
 2     <properties>
 3         <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
 4         <maven.compiler.source>1.8maven.compiler.source>
 5         <maven.compiler.target>1.8maven.compiler.target>
 6         <junit.version>4.12junit.version>
 7         <log4j.version>1.2.17log4j.version>
 8         <lombok.version>1.16.18lombok.version>
 9         <mysql.version>5.1.47mysql.version>
10         <druid.version>1.1.16druid.version>
11         <mybatis.spring.boot.version>1.3.2mybatis.spring.boot.version>
12     properties>
13 
14     
15     <dependencyManagement>
16         <dependencies>
17             
18             <dependency>
19                 <groupId>org.springframework.bootgroupId>
20                 <artifactId>spring-boot-dependenciesartifactId>
21                 <version>2.2.2.RELEASEversion>
22                 <type>pomtype>
23                 <scope>importscope>
24             dependency>
25             
26             <dependency>
27                 <groupId>org.springframework.cloudgroupId>
28                 <artifactId>spring-cloud-dependenciesartifactId>
29                 <version>Hoxton.SR1version>
30                 <type>pomtype>
31                 <scope>importscope>
32             dependency>
33             
34             <dependency>
35                 <groupId>com.alibaba.cloudgroupId>
36                 <artifactId>spring-cloud-alibaba-dependenciesartifactId>
37                 <version>2.1.0.RELEASEversion>
38                 <type>pomtype>
39                 <scope>importscope>
40             dependency>
41             <dependency>
42                 <groupId>mysqlgroupId>
43                 <artifactId>mysql-connector-javaartifactId>
44                 <version>${mysql.version}version>
45             dependency>
46             <dependency>
47                 <groupId>com.alibabagroupId>
48                 <artifactId>druid-spring-boot-starterartifactId>
49                 <version>${druid.version}version>
50             dependency>
51             <dependency>
52                 <groupId>org.mybatis.spring.bootgroupId>
53                 <artifactId>mybatis-spring-boot-starterartifactId>
54                 <version>${mybatis.spring.boot.version}version>
55             dependency>
56             <dependency>
57                 <groupId>junitgroupId>
58                 <artifactId>junitartifactId>
59                 <version>${junit.version}version>
60             dependency>
61             <dependency>
62                 <groupId>log4jgroupId>
63                 <artifactId>log4jartifactId>
64                 <version>${log4j.version}version>
65             dependency>
66             <dependency>
67                 <groupId>org.projectlombokgroupId>
68                 <artifactId>lombokartifactId>
69                 <version>${lombok.version}version>
70                 <optional>trueoptional>
71             dependency>
72         dependencies>
73     dependencyManagement>
74 
75     <build>
76         <plugins>
77             <plugin>
78                 <groupId>org.springframework.bootgroupId>
79                 <artifactId>spring-boot-maven-pluginartifactId>
80                 <configuration>
81                     <fork>truefork>
82                     <addResources>trueaddResources>
83                 configuration>
84             plugin>
85         plugins>
86     build>
pom.xml