JAVA-30669 Upgrade spring-cloud-bootstrap/gateway-2 to latest versions (#15898)
This commit is contained in:
parent
98fb738882
commit
de3aeccfe6
|
@ -9,46 +9,24 @@
|
|||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<artifactId>parent-boot-3</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../../parent-boot-2</relativePath>
|
||||
<relativePath>../../../parent-boot-3</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.junit</groupId>
|
||||
<artifactId>junit-bom</artifactId>
|
||||
<version>${junit-jupiter.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>${spring-cloud-dependencies.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-gateway</artifactId>
|
||||
<version>${spring-cloud-starter-gateway.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<spring-cloud-dependencies.version>2021.0.3</spring-cloud-dependencies.version>
|
||||
<spring-boot.version>3.2.2</spring-boot.version>
|
||||
<junit-jupiter.version>5.10.2</junit-jupiter.version>
|
||||
<spring-cloud-starter-gateway.version>4.1.1</spring-cloud-starter-gateway.version>
|
||||
<start-class>com.baeldung.springcloudgateway.introduction.IntroductionGatewayApplication</start-class>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -7,7 +7,7 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
|
||||
import org.springframework.cloud.gateway.handler.predicate.AbstractRoutePredicateFactory;
|
||||
import org.springframework.http.HttpCookie;
|
||||
|
@ -29,13 +29,11 @@ public class GoldenCustomerRoutePredicateFactory extends AbstractRoutePredicateF
|
|||
this.goldenCustomerService = goldenCustomerService;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> shortcutFieldOrder() {
|
||||
return Arrays.asList("isGolden","customerIdCookie");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Predicate<ServerWebExchange> apply(Config config) {
|
||||
|
||||
|
@ -94,9 +92,5 @@ public class GoldenCustomerRoutePredicateFactory extends AbstractRoutePredicateF
|
|||
public void setCustomerIdCookie(String customerIdCookie) {
|
||||
this.customerIdCookie = customerIdCookie;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
package com.baeldung.springcloudgateway.custompredicates;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.json.JSONTokener;
|
||||
import org.junit.Before;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||
import org.springframework.boot.web.server.LocalServerPort;
|
||||
import org.springframework.boot.test.web.server.LocalServerPort;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.RequestEntity;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
|
|
@ -3,9 +3,6 @@ package com.baeldung.springcloudgateway.introduction;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import com.baeldung.springcloudgateway.introduction.IntroductionGatewayApplication;
|
||||
|
||||
|
||||
@SpringBootTest(classes = IntroductionGatewayApplication.class)
|
||||
public class SpringContextTest {
|
||||
|
||||
|
|
Loading…
Reference in New Issue