pom.xml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <parent>
  5. <groupId>com.zhentao</groupId>
  6. <artifactId>Marriage</artifactId>
  7. <version>1.0-SNAPSHOT</version>
  8. </parent>
  9. <artifactId>gateway</artifactId>
  10. <packaging>jar</packaging>
  11. <name>gateway</name>
  12. <url>http://maven.apache.org</url>
  13. <properties>
  14. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  15. </properties>
  16. <dependencies>
  17. <!-- Spring Cloud Gateway -->
  18. <dependency>
  19. <groupId>org.springframework.cloud</groupId>
  20. <artifactId>spring-cloud-starter-gateway</artifactId>
  21. </dependency>
  22. <!-- 移除Nacos服务发现依赖,网关直连转发到后端服务 -->
  23. <!-- Spring Boot Actuator -->
  24. <dependency>
  25. <groupId>org.springframework.boot</groupId>
  26. <artifactId>spring-boot-starter-actuator</artifactId>
  27. </dependency>
  28. <!-- 网关不需要Redis依赖 -->
  29. <!-- Load balancer -->
  30. <!-- 直连无需LoadBalancer,可移除 -->
  31. <!-- 网关不需要数据库依赖 -->
  32. </dependencies>
  33. <build>
  34. <plugins>
  35. <plugin>
  36. <groupId>org.springframework.boot</groupId>
  37. <artifactId>spring-boot-maven-plugin</artifactId>
  38. <version>${spring-boot.version}</version>
  39. <executions>
  40. <execution>
  41. <goals>
  42. <goal>repackage</goal>
  43. </goals>
  44. </execution>
  45. </executions>
  46. <configuration>
  47. <jvmArguments>
  48. -Dnacos.remote.client.grpc.enabled=false
  49. -Dcom.alibaba.nacos.client.naming.cache.dir=${java.io.tmpdir}/nacos/naming
  50. </jvmArguments>
  51. </configuration>
  52. </plugin>
  53. </plugins>
  54. </build>
  55. </project>