Guest User

Untitled

a guest
May 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. @RestController
  2. public class TestController {
  3.  
  4. @GetMapping("/test")
  5. public ResponseEntity<Test> example (@RequestBody Test test){
  6. return new ResponseEntity<>(test, HttpStatus.OK);
  7. }
  8. }
  9.  
  10. public class Test {
  11. public String test;
  12.  
  13. public Test(String test) {
  14. this.test = test;
  15. }
  16.  
  17. public String getTest() {
  18. return test;
  19. }
  20.  
  21. public void setTest(String test) {
  22. this.test = test;
  23. }
  24. }
Add Comment
Please, Sign In to add comment