Polish @RequestMapping annotations (#979)
Co-authored-by: Moderne <team@moderne.io> Co-authored-by: Moderne <team@moderne.io>
This commit is contained in:
committed by
GitHub
parent
f8f549cc72
commit
e1a31619cc
@@ -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 {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@RequestMapping("/")
|
||||
@GetMapping("/")
|
||||
public String hello() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
@Value("${message:Hello World!}")
|
||||
String message;
|
||||
|
||||
@RequestMapping("/")
|
||||
@GetMapping("/")
|
||||
public String hello() {
|
||||
return this.message;
|
||||
}
|
||||
@@ -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 {
|
||||
@Value("${message:Hello World!}")
|
||||
String message;
|
||||
|
||||
@RequestMapping("/")
|
||||
@GetMapping("/")
|
||||
// Deliberately use package scope
|
||||
String hello() {
|
||||
return this.message;
|
||||
|
||||
@@ -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 {
|
||||
@Value("${message:Hello World!}")
|
||||
String message;
|
||||
|
||||
@RequestMapping("/")
|
||||
@GetMapping("/")
|
||||
public String hello() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user