You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project provides a library for building an API Gateway on top of Spring WebFlux. Spring Cloud Gateway aims to provide a simple, yet effective way to route to APIs and provide cross cutting concerns to them such as: security, monitoring/metrics, and resiliency.
This project provides a library for building an API Gateway on top of Spring. Spring Cloud Gateway aims to provide a simple, yet effective way to route to APIs and provide cross-cutting concerns to them such as: security, monitoring/metrics, and resiliency.
2
13
3
14
## Features
4
15
5
16
Spring Cloud Gateway features:
6
17
7
-
* Built on Spring Framework 5, Project Reactor and Spring Boot 2.0
18
+
* Built on Spring Framework and Spring Boot
19
+
* Compatible with both Spring WebFlux and Spring Web MVC
8
20
* Able to match routes on any request attribute.
9
21
* Predicates and filters are specific to routes.
10
-
* Hystrix Circuit Breaker integration.
22
+
* Spring Cloud Circuit Breaker integration.
11
23
* Spring Cloud DiscoveryClient integration
12
24
* Easy to write Predicates and Filters
13
25
* Request Rate Limiting
14
26
* Path Rewriting
15
27
16
-
## Getting Started
28
+
## Getting Started with Spring Cloud Gateway Server WebFlux
17
29
18
30
```java
19
31
@SpringBootApplication
@@ -22,25 +34,70 @@ public class DemogatewayApplication {
22
34
public RouteLocator customRouteLocator(RouteLocatorBuilder builder) {
23
35
return builder.routes()
24
36
.route("path_route", r -> r.path("/get")
25
-
.uri("http://httpbin.org"))
37
+
.uri("https://httpbin.org"))
26
38
.route("host_route", r -> r.host("*.myhost.org")
27
-
.uri("http://httpbin.org"))
39
+
.uri("https://httpbin.org"))
28
40
.route("rewrite_route", r -> r.host("*.rewrite.org")
Copy file name to clipboardExpand all lines: spring-cloud-gateway-integration-tests/grpc/src/test/java/org/springframework/cloud/gateway/tests/grpc/JsonToGrpcApplicationTests.java
Copy file name to clipboardExpand all lines: spring-cloud-gateway-mvc/src/test/java/org/springframework/cloud/gateway/mvc/ProductionConfigurationTests.java
0 commit comments