[JAVA-29182] Upgrade spring-cloud-modules/spring-cloud-gateway-2 to Spring Boot 3 (#16027)

This commit is contained in:
timis1 2024-03-04 23:10:37 +02:00 committed by GitHub
parent 705186ddbf
commit da96bb6ed8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 8 deletions

View File

@ -8,9 +8,10 @@
<packaging>jar</packaging> <packaging>jar</packaging>
<parent> <parent>
<groupId>com.baeldung.spring.cloud</groupId> <groupId>com.baeldung</groupId>
<artifactId>spring-cloud-modules</artifactId> <artifactId>parent-boot-3</artifactId>
<version>1.0.0-SNAPSHOT</version> <relativePath>../../parent-boot-3</relativePath>
<version>0.0.1-SNAPSHOT</version>
</parent> </parent>
<dependencyManagement> <dependencyManagement>
@ -61,10 +62,6 @@
<artifactId>hibernate-validator-cdi</artifactId> <artifactId>hibernate-validator-cdi</artifactId>
<version>${hibernate-validator.version}</version> <version>${hibernate-validator.version}</version>
</dependency> </dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId> <artifactId>spring-boot-starter-actuator</artifactId>
@ -119,6 +116,7 @@
<hibernate-validator.version>8.0.1.Final</hibernate-validator.version> <hibernate-validator.version>8.0.1.Final</hibernate-validator.version>
<redis.version>0.7.2</redis.version> <redis.version>0.7.2</redis.version>
<oauth2-oidc-sdk.version>9.19</oauth2-oidc-sdk.version> <oauth2-oidc-sdk.version>9.19</oauth2-oidc-sdk.version>
<spring-cloud-dependencies.version>2022.0.4</spring-cloud-dependencies.version>
</properties> </properties>
</project> </project>

View File

@ -11,7 +11,7 @@ import java.net.InetSocketAddress;
@Primary @Primary
@Component @Component
public class ProxiedClientAddressResolver implements KeyResolver { public class ProxyClientAddressResolver implements KeyResolver {
@Override @Override
public Mono<String> resolve(ServerWebExchange exchange) { public Mono<String> resolve(ServerWebExchange exchange) {
XForwardedRemoteAddressResolver resolver = XForwardedRemoteAddressResolver.maxTrustedIndex(1); XForwardedRemoteAddressResolver resolver = XForwardedRemoteAddressResolver.maxTrustedIndex(1);