Skip to content

Commit

Permalink
优化pom 文件,防止gateway server 被高版本spring cloud 覆盖
Browse files Browse the repository at this point in the history
  • Loading branch information
helloexp committed Mar 4, 2022
1 parent fff9522 commit b7f525b
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 0 deletions.
8 changes: 8 additions & 0 deletions 00-CVE_EXP/CVE-2022-22947/环境搭建/源码/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.3-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->

</parent>
<groupId>pl.wya</groupId>
<artifactId>spring-gateway-demo</artifactId>
Expand All @@ -21,6 +22,13 @@
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>

<!-- 指定gateway server 版本-->
<!-- 如果不指定,默认为 3.1.1-SNAPSHOT-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gateway-server</artifactId>
<version>3.1.0</version>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.3-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->

</parent>
<groupId>pl.wya</groupId>
<artifactId>spring-gateway-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>spring-gateway-demo</name>
<description>Spring Gateway Demo For RCE</description>
<properties>
<java.version>1.8</java.version>
<spring-cloud.version>2021.0.1-SNAPSHOT</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>

<!-- 指定gateway server 版本-->
<!-- 如果不指定,默认为 3.1.1-SNAPSHOT-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gateway-server</artifactId>
<version>3.1.0</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>

</project>

0 comments on commit b7f525b

Please sign in to comment.