@Controller
@RequestMapping("/test")
public class TestController
extends Object
Test @RestController
- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
-
-
Constructor Summary
Constructors
-
Method Summary
org.springframework.http.ResponseEntity<String>
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
TestController
public TestController()
-
Method Details
-
helloWorld
@GetMapping("/helloworld")
@ResponseBody
public String helloWorld()
-
greeting
@GetMapping("/greeting/{message}")
@ResponseBody
public String greeting(@PathVariable
String message)
-
user
@PostMapping(path="/user",
produces="application/json")
@ResponseBody
public User user(@RequestBody
User user)
-
error
@GetMapping("/error")
@ResponseBody
public String error(@RequestParam
String message)
-
responseEntity
@PutMapping("/response-entity")
public org.springframework.http.ResponseEntity<String> responseEntity()
-
view
@GetMapping("/view")
public String view()