1.demo-parent

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