From 52c3fd97fed4c5016f7c1f65d3176bd68f21e241 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Mon, 2 Mar 2020 20:02:08 -0500 Subject: [PATCH] formatting --- .../test/HttpBinCompatibleController.java | 22 ++++++++++++------- .../mvc/ProductionConfigurationTests.java | 4 ++-- .../webflux/ProductionConfigurationTests.java | 4 ++-- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/HttpBinCompatibleController.java b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/HttpBinCompatibleController.java index 6be85d32..f1422acf 100644 --- a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/HttpBinCompatibleController.java +++ b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/HttpBinCompatibleController.java @@ -63,16 +63,17 @@ public class HttpBinCompatibleController { return "httpbin compatible home"; } - @RequestMapping(path = "/headers", method = { RequestMethod.GET, - RequestMethod.POST }, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(path = "/headers", method = { RequestMethod.GET, RequestMethod.POST }, + produces = MediaType.APPLICATION_JSON_VALUE) public Map headers(ServerWebExchange exchange) { Map result = new HashMap<>(); result.put("headers", getHeaders(exchange)); return result; } - @RequestMapping(path = "/multivalueheaders", method = { RequestMethod.GET, - RequestMethod.POST }, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(path = "/multivalueheaders", + method = { RequestMethod.GET, RequestMethod.POST }, + produces = MediaType.APPLICATION_JSON_VALUE) public Map multiValueHeaders(ServerWebExchange exchange) { Map result = new HashMap<>(); result.put("headers", exchange.getRequest().getHeaders()); @@ -86,7 +87,8 @@ public class HttpBinCompatibleController { return Mono.just(get(exchange)).delayElement(Duration.ofSeconds(delay)); } - @RequestMapping(path = "/anything/{anything}", produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(path = "/anything/{anything}", + produces = MediaType.APPLICATION_JSON_VALUE) public Map anything(ServerWebExchange exchange, @PathVariable(required = false) String anything) { return get(exchange); @@ -107,7 +109,8 @@ public class HttpBinCompatibleController { return result; } - @RequestMapping(value = "/post", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/post", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, + produces = MediaType.APPLICATION_JSON_VALUE) public Mono> postFormData( @RequestBody Mono> parts) { // StringDecoder decoder = StringDecoder.allMimeTypes(true); @@ -123,13 +126,16 @@ public class HttpBinCompatibleController { }).map(files -> Collections.singletonMap("files", files)); } - @RequestMapping(path = "/post", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(path = "/post", + consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, + produces = MediaType.APPLICATION_JSON_VALUE) public Mono> postUrlEncoded(ServerWebExchange exchange) throws IOException { return post(exchange, null); } - @RequestMapping(path = "/post", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(path = "/post", method = RequestMethod.POST, + produces = MediaType.APPLICATION_JSON_VALUE) public Mono> post(ServerWebExchange exchange, @RequestBody(required = false) String body) throws IOException { HashMap ret = new HashMap<>(); diff --git a/spring-cloud-gateway-mvc/src/test/java/org/springframework/cloud/gateway/mvc/ProductionConfigurationTests.java b/spring-cloud-gateway-mvc/src/test/java/org/springframework/cloud/gateway/mvc/ProductionConfigurationTests.java index 4e3f8ae7..d7d53fe0 100644 --- a/spring-cloud-gateway-mvc/src/test/java/org/springframework/cloud/gateway/mvc/ProductionConfigurationTests.java +++ b/spring-cloud-gateway-mvc/src/test/java/org/springframework/cloud/gateway/mvc/ProductionConfigurationTests.java @@ -55,8 +55,8 @@ import org.springframework.web.util.UriComponentsBuilder; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringRunner.class) -@SpringBootTest(properties = { - "spring.cloud.gateway.proxy.auto-forward=baz" }, webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest(properties = { "spring.cloud.gateway.proxy.auto-forward=baz" }, + webEnvironment = WebEnvironment.RANDOM_PORT) @ContextConfiguration(classes = TestApplication.class) public class ProductionConfigurationTests { diff --git a/spring-cloud-gateway-webflux/src/test/java/org/springframework/cloud/gateway/webflux/ProductionConfigurationTests.java b/spring-cloud-gateway-webflux/src/test/java/org/springframework/cloud/gateway/webflux/ProductionConfigurationTests.java index 6e3ac0be..78bedee6 100644 --- a/spring-cloud-gateway-webflux/src/test/java/org/springframework/cloud/gateway/webflux/ProductionConfigurationTests.java +++ b/spring-cloud-gateway-webflux/src/test/java/org/springframework/cloud/gateway/webflux/ProductionConfigurationTests.java @@ -58,8 +58,8 @@ import org.springframework.web.util.UriComponentsBuilder; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringRunner.class) -@SpringBootTest(properties = { - "spring.cloud.gateway.proxy.auto-forward=baz" }, webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest(properties = { "spring.cloud.gateway.proxy.auto-forward=baz" }, + webEnvironment = WebEnvironment.RANDOM_PORT) @ContextConfiguration(classes = TestApplication.class) @DirtiesContext public class ProductionConfigurationTests {