1. <?xml version="1.0" encoding="UTF-8"?>
    2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    4. <modelVersion>4.0.0</modelVersion>
    5. <groupId>com.wzy</groupId>
    6. <artifactId>cloud2020</artifactId>
    7. <version>4.0-SNAPSHOT</version>
    8. <packaging>pom</packaging><!-- 这里添加为pom,注意不是jar或war -->
    9. <!-- 统一管理jar包版本 -->
    10. <properties>
    11. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    12. <maven.compiler.source>1.8</maven.compiler.source>
    13. <maven.compiler.target>1.8</maven.compiler.target>
    14. <junit.version>4.12</junit.version>
    15. <log4j.version>1.2.17</log4j.version>
    16. <lombok.version>1.16.18</lombok.version>
    17. <mysql.version>5.1.47</mysql.version>
    18. <druid.version>1.1.16</druid.version>
    19. <mybatis.spring.boot.version>1.3.0</mybatis.spring.boot.version>
    20. </properties>
    21. <!-- 子模块继承之后,提供作用:锁定版本+子modlue不用写groupId和version -->
    22. <dependencyManagement>
    23. <dependencies>
    24. <!--spring boot 2.2.2-->
    25. <dependency>
    26. <groupId>org.springframework.boot</groupId>
    27. <artifactId>spring-boot-dependencies</artifactId>
    28. <version>2.2.2.RELEASE</version>
    29. <type>pom</type>
    30. <scope>import</scope>
    31. </dependency>
    32. <!--spring cloud Hoxton.SR1-->
    33. <dependency>
    34. <groupId>org.springframework.cloud</groupId>
    35. <artifactId>spring-cloud-dependencies</artifactId>
    36. <version>Hoxton.SR1</version>
    37. <type>pom</type>
    38. <scope>import</scope>
    39. </dependency>
    40. <!--spring cloud alibaba 2.1.0.RELEASE-->
    41. <dependency>
    42. <groupId>com.alibaba.cloud</groupId>
    43. <artifactId>spring-cloud-alibaba-dependencies</artifactId>
    44. <version>2.1.0.RELEASE</version>
    45. <type>pom</type>
    46. <scope>import</scope>
    47. </dependency>
    48. <dependency>
    49. <groupId>mysql</groupId>
    50. <artifactId>mysql-connector-java</artifactId>
    51. <version>${mysql.version}</version>
    52. </dependency>
    53. <dependency>
    54. <groupId>com.alibaba</groupId>
    55. <artifactId>druid</artifactId>
    56. <version>${druid.version}</version>
    57. </dependency>
    58. <dependency>
    59. <groupId>org.mybatis.spring.boot</groupId>
    60. <artifactId>mybatis-spring-boot-starter</artifactId>
    61. <version>${mybatis.spring.boot.version}</version>
    62. </dependency>
    63. <dependency>
    64. <groupId>junit</groupId>
    65. <artifactId>junit</artifactId>
    66. <version>${junit.version}</version>
    67. </dependency>
    68. <dependency>
    69. <groupId>log4j</groupId>
    70. <artifactId>log4j</artifactId>
    71. <version>${log4j.version}</version>
    72. </dependency>
    73. <dependency>
    74. <groupId>org.projectlombok</groupId>
    75. <artifactId>lombok</artifactId>
    76. <version>${lombok.version}</version>
    77. <optional>true</optional>
    78. </dependency>
    79. </dependencies>
    80. </dependencyManagement>
    81. <build>
    82. <plugins>
    83. <plugin>
    84. <groupId>org.springframework.boot</groupId>
    85. <artifactId>spring-boot-maven-plugin</artifactId>
    86. <configuration>
    87. <fork>true</fork>
    88. <addResources>true</addResources>
    89. </configuration>
    90. </plugin>
    91. </plugins>
    92. </build>
    93. </project>