{"id":75826,"date":"2018-04-12T10:00:42","date_gmt":"2018-04-12T07:00:42","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=75826"},"modified":"2018-04-12T09:40:46","modified_gmt":"2018-04-12T06:40:46","slug":"spring-cloud-gateway-configuring-a-simple-route","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html","title":{"rendered":"Spring Cloud Gateway &#8211; Configuring a simple route"},"content":{"rendered":"<p><a href=\"https:\/\/cloud.spring.io\/spring-cloud-gateway\/\">Spring Cloud Gateway<\/a> can be considered a successor to the\u00a0<a href=\"https:\/\/cloud.spring.io\/spring-cloud-netflix\/single\/spring-cloud-netflix.html#_router_and_filter_zuul\">Spring Cloud Netflix Zuul<\/a> project and helps in implementing a\u00a0<a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/architecture\/patterns\/gateway-routing\">Gateway pattern<\/a> in a microservices environment. It is built on top of<br \/>\n<a href=\"https:\/\/projects.spring.io\/spring-boot\/\">Spring Boot 2<\/a> and\u00a0<a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web-reactive.html\">Spring Webflux<\/a> and is non-blocking end to end &#8211; it exposes a Netty based server, uses a Netty based client to make the downstream microservice calls and uses\u00a0<a href=\"http:\/\/projectreactor.io\/\">reactor-core<\/a> for the rest of the flow.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/ApiGateway.png\"><img decoding=\"async\" class=\"aligncenter wp-image-75828\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/ApiGateway-1024x431.png\" alt=\"\" width=\"860\" height=\"362\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/ApiGateway-1024x431.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/ApiGateway-300x126.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/ApiGateway-768x323.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/ApiGateway.png 1600w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><\/p>\n<p>My objective here is to show how a small Spring Cloud Netflix Zuul based route can be translated in multiple ways using Spring Cloud Gateway.<\/p>\n<h3>Spring Cloud Netflix Zuul<\/h3>\n<p>Spring Cloud Zuul allows simple routing rules to be configured using property files expressed as a yaml here:<\/p>\n<pre class=\"brush:java\">zuul:\r\n  routes:\r\n    sample:\r\n      path: \/zuul\/**\r\n      url: http:\/\/httpbin.org:80\r\n      strip-prefix: true<\/pre>\n<p>This route would expose an endpoint in Zuul which intercepts any requests made to uri&#8217;s with a prefix of &#8220;\/zuul&#8221; and forwards it to the downstream system after stripping out the &#8220;zuul&#8221; prefix.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<h3>Spring Cloud Gateway<\/h3>\n<p>Spring Cloud Gateway allows an equivalent functionality to be coded in three ways &#8211; using a Java based DSL, using Kotlin based DSL and using simple property based configuration.<\/p>\n<p>A starter project can be generated using the excellent http:\/\/start.spring.io site:<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/SpringStarter-Gateway.png\"><img decoding=\"async\" class=\"aligncenter wp-image-75829\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/SpringStarter-Gateway-1024x442.png\" alt=\"\" width=\"860\" height=\"371\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/SpringStarter-Gateway-1024x442.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/SpringStarter-Gateway-300x130.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/SpringStarter-Gateway-768x332.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/SpringStarter-Gateway.png 1600w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><\/p>\n<h2>Java Based DSL<\/h2>\n<p>A Java based dsl that creates a route similar to the Zuul route is the following:<\/p>\n<pre class=\"brush:java\">import org.springframework.cloud.gateway.route.RouteLocator;\r\nimport org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;\r\nimport org.springframework.context.annotation.Bean;\r\nimport org.springframework.context.annotation.Configuration;\r\n\r\n@Configuration\r\npublic class GatewayRoutes {\r\n\r\n    @Bean\r\n    public RouteLocator routeLocator(RouteLocatorBuilder builder) {\r\n        return builder.routes()\r\n                .route(r -&gt;\r\n                        r.path(\"\/java\/**\")\r\n                                .filters(\r\n                                        f -&gt; f.stripPrefix(1)\r\n                                )\r\n                                .uri(\"http:\/\/httpbin.org:80\")\r\n                )\r\n                .build();\r\n    }\r\n\r\n}<\/pre>\n<p>This is a readable DSL that configures a route which intercepts uri&#8217;s with a prefix of &#8220;java&#8221; and sends it to a downstream system after stripping out this prefix.<\/p>\n<h2>Kotlin Based DSL<\/h2>\n<p>A Kotlin based DSL to configure this route looks like this.<\/p>\n<pre class=\"brush:java\">import org.springframework.cloud.gateway.route.RouteLocator\r\nimport org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder\r\nimport org.springframework.cloud.gateway.route.builder.filters\r\nimport org.springframework.cloud.gateway.route.builder.routes\r\nimport org.springframework.context.annotation.Bean\r\nimport org.springframework.context.annotation.Configuration\r\n\r\n@Configuration\r\nclass KotlinRoutes {\r\n\r\n    @Bean\r\n    fun kotlinBasedRoutes(routeLocatorBuilder: RouteLocatorBuilder): RouteLocator =\r\n            routeLocatorBuilder.routes {\r\n                route { \r\n                    path(\"\/kotlin\/**\")\r\n                    filters { stripPrefix(1) }\r\n                    uri(\"http:\/\/httpbin.org\")\r\n                }\r\n            }\r\n}<\/pre>\n<p>I had originally submitted the\u00a0<a href=\"https:\/\/github.com\/spring-cloud\/spring-cloud-gateway\/pull\/62\">PR for Kotlin based DSL for Spring Cloud Gateway<\/a> routes and so have a bias towards using Kotlin for configuring Spring Cloud Gateway :-). The route takes in urls with a prefix of &#8220;kotlin&#8221; and strips it out before making the downstream microservice call.<\/p>\n<h2>Property based Route<\/h2>\n<p>And finally the property based one:<\/p>\n<pre class=\"brush:java\">spring:\r\n  cloud:\r\n    gateway:\r\n      routes: \r\n        - predicates:\r\n            - Path=\/props\/**\r\n          filters:\r\n            - StripPrefix=1\r\n          uri: \"http:\/\/httpbin.org\"<\/pre>\n<p>This route like the Java and Kotlin version takes in a url with a prefix of &#8220;props&#8221; and strips this prefix out before making the downstream call. The properties based version has the added advantage of being refreshable at runtime.<\/p>\n<h2>Conclusion<\/h2>\n<p>This is a very quick intro to Spring Cloud Gateway by comparing how a typical configuration from Spring Cloud Netflix Zuul maps to Spring Cloud Gateway.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>Published on Java Code Geeks with permission by Biju Kunjummen, partner at our <a href=\"\/\/www.javacodegeeks.com\/join-us\/jcg\/\" target=\"_blank\" rel=\"noopener\">JCG program<\/a>. See the original article here: <a href=\"http:\/\/www.java-allandsundry.com\/2018\/04\/spring-cloud-gateway-configuring-simple.html\" target=\"_blank\" rel=\"noopener\">Spring Cloud Gateway &#8211; Configuring a simple route<\/a><\/p>\n<p>Opinions expressed by Java Code Geeks contributors are their own.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Spring Cloud Gateway can be considered a successor to the\u00a0Spring Cloud Netflix Zuul project and helps in implementing a\u00a0Gateway pattern in a microservices environment. It is built on top of Spring Boot 2 and\u00a0Spring Webflux and is non-blocking end to end &#8211; it exposes a Netty based server, uses a Netty based client to make &hellip;<\/p>\n","protected":false},"author":236,"featured_media":240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[30,992],"class_list":["post-75826","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-spring","tag-spring-cloud"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Cloud Gateway - Configuring a simple route - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Spring Cloud Gateway can be considered a successor to the\u00a0Spring Cloud Netflix Zuul project and helps in implementing a\u00a0Gateway pattern in a microservices\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Cloud Gateway - Configuring a simple route - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Spring Cloud Gateway can be considered a successor to the\u00a0Spring Cloud Netflix Zuul project and helps in implementing a\u00a0Gateway pattern in a microservices\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-12T07:00:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Biju Kunjummen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Biju Kunjummen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/spring-cloud-gateway-configuring-a-simple-route.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/spring-cloud-gateway-configuring-a-simple-route.html\"},\"author\":{\"name\":\"Biju Kunjummen\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/802eedfe6f17c3c13fa656af46b6b0e5\"},\"headline\":\"Spring Cloud Gateway &#8211; Configuring a simple route\",\"datePublished\":\"2018-04-12T07:00:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/spring-cloud-gateway-configuring-a-simple-route.html\"},\"wordCount\":431,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/spring-cloud-gateway-configuring-a-simple-route.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"keywords\":[\"Spring\",\"Spring Cloud\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/spring-cloud-gateway-configuring-a-simple-route.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/spring-cloud-gateway-configuring-a-simple-route.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/spring-cloud-gateway-configuring-a-simple-route.html\",\"name\":\"Spring Cloud Gateway - Configuring a simple route - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/spring-cloud-gateway-configuring-a-simple-route.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/spring-cloud-gateway-configuring-a-simple-route.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"datePublished\":\"2018-04-12T07:00:42+00:00\",\"description\":\"Spring Cloud Gateway can be considered a successor to the\u00a0Spring Cloud Netflix Zuul project and helps in implementing a\u00a0Gateway pattern in a microservices\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/spring-cloud-gateway-configuring-a-simple-route.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/spring-cloud-gateway-configuring-a-simple-route.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/spring-cloud-gateway-configuring-a-simple-route.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"spring-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/spring-cloud-gateway-configuring-a-simple-route.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Spring Cloud Gateway &#8211; Configuring a simple route\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/802eedfe6f17c3c13fa656af46b6b0e5\",\"name\":\"Biju Kunjummen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g\",\"caption\":\"Biju Kunjummen\"},\"sameAs\":[\"http:\\\/\\\/biju-allandsundry.blogspot.com\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Biju-Kunjummen\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Cloud Gateway - Configuring a simple route - Java Code Geeks","description":"Spring Cloud Gateway can be considered a successor to the\u00a0Spring Cloud Netflix Zuul project and helps in implementing a\u00a0Gateway pattern in a microservices","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html","og_locale":"en_US","og_type":"article","og_title":"Spring Cloud Gateway - Configuring a simple route - Java Code Geeks","og_description":"Spring Cloud Gateway can be considered a successor to the\u00a0Spring Cloud Netflix Zuul project and helps in implementing a\u00a0Gateway pattern in a microservices","og_url":"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2018-04-12T07:00:42+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","type":"image\/jpeg"}],"author":"Biju Kunjummen","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Biju Kunjummen","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html"},"author":{"name":"Biju Kunjummen","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/802eedfe6f17c3c13fa656af46b6b0e5"},"headline":"Spring Cloud Gateway &#8211; Configuring a simple route","datePublished":"2018-04-12T07:00:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html"},"wordCount":431,"commentCount":2,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","keywords":["Spring","Spring Cloud"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html","url":"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html","name":"Spring Cloud Gateway - Configuring a simple route - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","datePublished":"2018-04-12T07:00:42+00:00","description":"Spring Cloud Gateway can be considered a successor to the\u00a0Spring Cloud Netflix Zuul project and helps in implementing a\u00a0Gateway pattern in a microservices","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","width":150,"height":150,"caption":"spring-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/spring-cloud-gateway-configuring-a-simple-route.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Spring Cloud Gateway &#8211; Configuring a simple route"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/802eedfe6f17c3c13fa656af46b6b0e5","name":"Biju Kunjummen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g","caption":"Biju Kunjummen"},"sameAs":["http:\/\/biju-allandsundry.blogspot.com"],"url":"https:\/\/www.javacodegeeks.com\/author\/Biju-Kunjummen"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/75826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/236"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=75826"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/75826\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/240"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=75826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=75826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=75826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}