Browse Source

Polish `@RequestMapping` annotations (#979)

Co-authored-by: Moderne <team@moderne.io>

Co-authored-by: Moderne <team@moderne.io>
pull/1097/head
Jonathan Schneider 3 years ago committed by GitHub
parent
commit
e1a31619cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/reactive/ReactorLoadBalancerExchangeFilterFunctionTests.java
  2. 4
      spring-cloud-context/src/test/java/org/springframework/cloud/context/scope/refresh/RefreshEndpointIntegrationTests.java
  3. 8
      spring-cloud-context/src/test/java/org/springframework/cloud/context/scope/refresh/RefreshScopeConfigurationTests.java
  4. 4
      spring-cloud-context/src/test/java/org/springframework/cloud/context/scope/refresh/RefreshScopeWebIntegrationTests.java

6
spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/reactive/ReactorLoadBalancerExchangeFilterFunctionTests.java

@ -47,7 +47,7 @@ import org.springframework.cloud.client.loadbalancer.Response; @@ -47,7 +47,7 @@ import org.springframework.cloud.client.loadbalancer.Response;
import org.springframework.cloud.client.loadbalancer.ResponseData;
import org.springframework.context.annotation.Bean;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.reactive.function.client.ClientResponse;
import org.springframework.web.reactive.function.client.WebClient;
@ -160,12 +160,12 @@ class ReactorLoadBalancerExchangeFilterFunctionTests { @@ -160,12 +160,12 @@ class ReactorLoadBalancerExchangeFilterFunctionTests {
@RestController
static class Config {
@RequestMapping("/hello")
@GetMapping("/hello")
public String hello() {
return "Hello World";
}
@RequestMapping("/callback")
@GetMapping("/callback")
String callbackTestResult() {
return "callbackTestResult";
}

4
spring-cloud-context/src/test/java/org/springframework/cloud/context/scope/refresh/RefreshEndpointIntegrationTests.java

@ -40,7 +40,7 @@ import org.springframework.http.HttpMethod; @@ -40,7 +40,7 @@ import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.http.RequestEntity;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import static org.assertj.core.api.BDDAssertions.then;
@ -109,7 +109,7 @@ public class RefreshEndpointIntegrationTests { @@ -109,7 +109,7 @@ public class RefreshEndpointIntegrationTests {
this.message = message;
}
@RequestMapping("/")
@GetMapping("/")
public String hello() {
return this.message;
}

8
spring-cloud-context/src/test/java/org/springframework/cloud/context/scope/refresh/RefreshScopeConfigurationTests.java

@ -33,7 +33,7 @@ import org.springframework.cloud.context.scope.refresh.RefreshScopeConfiguration @@ -33,7 +33,7 @@ import org.springframework.cloud.context.scope.refresh.RefreshScopeConfiguration
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import static org.assertj.core.api.BDDAssertions.then;
@ -120,7 +120,7 @@ public class RefreshScopeConfigurationTests { @@ -120,7 +120,7 @@ public class RefreshScopeConfigurationTests {
@Value("${message:Hello World!}")
String message;
@RequestMapping("/")
@GetMapping("/")
public String hello() {
return this.message;
}
@ -140,7 +140,7 @@ public class RefreshScopeConfigurationTests { @@ -140,7 +140,7 @@ public class RefreshScopeConfigurationTests {
SpringApplication.run(Application.class, args);
}
@RequestMapping("/")
@GetMapping("/")
public String hello() {
return this.message;
}
@ -168,7 +168,7 @@ public class RefreshScopeConfigurationTests { @@ -168,7 +168,7 @@ public class RefreshScopeConfigurationTests {
@Value("${message:Hello World!}")
String message;
@RequestMapping("/")
@GetMapping("/")
// Deliberately use package scope
String hello() {
return this.message;

4
spring-cloud-context/src/test/java/org/springframework/cloud/context/scope/refresh/RefreshScopeWebIntegrationTests.java

@ -32,7 +32,7 @@ import org.springframework.cloud.context.scope.refresh.RefreshScopeWebIntegratio @@ -32,7 +32,7 @@ import org.springframework.cloud.context.scope.refresh.RefreshScopeWebIntegratio
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import static org.assertj.core.api.BDDAssertions.then;
@ -94,7 +94,7 @@ public class RefreshScopeWebIntegrationTests { @@ -94,7 +94,7 @@ public class RefreshScopeWebIntegrationTests {
@Value("${message:Hello World!}")
String message;
@RequestMapping("/")
@GetMapping("/")
public String hello() {
return this.message;
}

Loading…
Cancel
Save