pom.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <parent>
  6. <groupId>org.springframework.boot</groupId>
  7. <artifactId>spring-boot-starter-parent</artifactId>
  8. <version>2.7.11</version>
  9. <relativePath/> <!-- lookup parent from repository -->
  10. </parent>
  11. <groupId>com.example</groupId>
  12. <artifactId>generic-parent</artifactId>
  13. <version>0.0.1-SNAPSHOT</version>
  14. <name>generic-parent</name>
  15. <description>generic-parent</description>
  16. <!-- 建立父子 Module依赖-->
  17. <packaging>pom</packaging>
  18. <modules>
  19. <module>user</module>
  20. </modules>
  21. <properties>
  22. <java.version>1.8</java.version>
  23. <!--springCloud版本-->
  24. <spring-cloud.version>2021.0.1</spring-cloud.version>
  25. </properties>
  26. <dependencies>
  27. <!-- mongodb-->
  28. <dependency>
  29. <groupId>org.springframework.data</groupId>
  30. <artifactId>spring-data-mongodb</artifactId>
  31. </dependency>
  32. <dependency>
  33. <groupId>org.springframework.boot</groupId>
  34. <artifactId>spring-boot-starter-data-mongodb</artifactId>
  35. </dependency>
  36. <!-- redis-->
  37. <dependency>
  38. <groupId>org.springframework.boot</groupId>
  39. <artifactId>spring-boot-starter-data-redis-reactive</artifactId>
  40. </dependency>
  41. <dependency>
  42. <groupId>org.springframework.boot</groupId>
  43. <artifactId>spring-boot-starter-web</artifactId>
  44. </dependency>
  45. <dependency>
  46. <groupId>org.springframework.boot</groupId>
  47. <artifactId>spring-boot-starter-test</artifactId>
  48. <scope>test</scope>
  49. </dependency>
  50. <dependency>
  51. <groupId>io.projectreactor</groupId>
  52. <artifactId>reactor-test</artifactId>
  53. <scope>test</scope>
  54. </dependency>
  55. <!--zuul依赖 -->
  56. <dependency>
  57. <groupId>org.springframework.cloud</groupId>
  58. <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
  59. <version>2.2.6.RELEASE</version>
  60. </dependency>
  61. <!--ribbon-->
  62. <dependency>
  63. <groupId>org.springframework.cloud</groupId>
  64. <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
  65. <version>2.2.6.RELEASE</version>
  66. </dependency>
  67. <dependency>
  68. <groupId>org.hibernate.validator</groupId>
  69. <artifactId>hibernate-validator</artifactId>
  70. </dependency>
  71. <!-- Nacos依赖-->
  72. <dependency>
  73. <groupId>com.alibaba.cloud</groupId>
  74. <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
  75. <version>2.2.6.RELEASE</version>
  76. <!--openfeign里面有复载均衡,所以这里必须注释掉,不然会冲突-->
  77. <exclusions>
  78. <exclusion>
  79. <groupId>org.springframework.cloud</groupId>
  80. <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
  81. </exclusion>
  82. </exclusions>
  83. </dependency>
  84. <dependency>
  85. <groupId>org.springframework.cloud</groupId>
  86. <artifactId>spring-cloud-starter-bootstrap</artifactId>
  87. </dependency>
  88. <dependency>
  89. <groupId>com.alibaba.cloud</groupId>
  90. <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
  91. <version>2.2.6.RELEASE</version>
  92. </dependency>
  93. <!-- https://mvnrepository.com/artifact/io.swagger/swagger-annotations -->
  94. <dependency>
  95. <groupId>io.swagger</groupId>
  96. <artifactId>swagger-annotations</artifactId>
  97. <version>1.6.2</version>
  98. </dependency>
  99. <!--openfeign依赖 Feign的注解定义接口,调用这个接口,就可以调用服务注册中心的服务-->
  100. <dependency>
  101. <groupId>org.springframework.cloud</groupId>
  102. <artifactId>spring-cloud-starter-openfeign</artifactId>
  103. </dependency>
  104. <!--openfiegn使用时需要搭配loadbalancer负载均衡-->
  105. <dependency>
  106. <groupId>org.springframework.cloud</groupId>
  107. <artifactId>spring-cloud-loadbalancer</artifactId>
  108. </dependency>
  109. <dependency>
  110. <groupId>org.projectlombok</groupId>
  111. <artifactId>lombok</artifactId>
  112. <version>1.18.20</version>
  113. </dependency>
  114. </dependencies>
  115. <dependencyManagement>
  116. <!--springBoot的核心依赖,也是继承,可插拔机制,只会加载配置的依赖-->
  117. <dependencies>
  118. <dependency>
  119. <groupId>org.springframework.cloud</groupId>
  120. <artifactId>spring-cloud-dependencies</artifactId>
  121. <version>${spring-cloud.version}</version>
  122. <type>pom</type>
  123. <scope>import</scope>
  124. </dependency>
  125. </dependencies>
  126. </dependencyManagement>
  127. <build>
  128. <plugins>
  129. <plugin>
  130. <groupId>org.springframework.boot</groupId>
  131. <artifactId>spring-boot-maven-plugin</artifactId>
  132. </plugin>
  133. </plugins>
  134. </build>
  135. </project>