pom.xml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. <!-- &lt;!&ndash;openfeign里面有复载均衡,所以这里必须注释掉,不然会冲突&ndash;&gt;-->
  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>com.alibaba.cloud</groupId>-->
  86. <!-- <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>-->
  87. <!-- <version>2.2.6.RELEASE</version>-->
  88. <!-- </dependency>-->
  89. <!--openfeign依赖 Feign的注解定义接口,调用这个接口,就可以调用服务注册中心的服务-->
  90. <dependency>
  91. <groupId>org.springframework.cloud</groupId>
  92. <artifactId>spring-cloud-starter-openfeign</artifactId>
  93. </dependency>
  94. <!--openfiegn使用时需要搭配loadbalancer负载均衡-->
  95. <dependency>
  96. <groupId>org.springframework.cloud</groupId>
  97. <artifactId>spring-cloud-loadbalancer</artifactId>
  98. </dependency>
  99. <dependency>
  100. <groupId>org.projectlombok</groupId>
  101. <artifactId>lombok</artifactId>
  102. <version>1.18.20</version>
  103. </dependency>
  104. </dependencies>
  105. <dependencyManagement>
  106. <!--springBoot的核心依赖,也是继承,可插拔机制,只会加载配置的依赖-->
  107. <dependencies>
  108. <dependency>
  109. <groupId>org.springframework.cloud</groupId>
  110. <artifactId>spring-cloud-dependencies</artifactId>
  111. <version>${spring-cloud.version}</version>
  112. <type>pom</type>
  113. <scope>import</scope>
  114. </dependency>
  115. </dependencies>
  116. </dependencyManagement>
  117. <build>
  118. <plugins>
  119. <plugin>
  120. <groupId>org.springframework.boot</groupId>
  121. <artifactId>spring-boot-maven-plugin</artifactId>
  122. </plugin>
  123. </plugins>
  124. </build>
  125. </project>