Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RestController
- @RequestMapping (value = "/test")
- public class TestController {
- // localhost:8080/test/greeting
- @RequestMapping(value = "/greeting", method = RequestMethod.GET)
- public String getSimpleGreeting() {
- return "Hello World!";
- }
- // localhost:8080/test/greeting/entity
- @RequestMapping(value = "/greeting/entity", method = RequestMethod.GET)
- public ResponseEntity<String> getGreetingWithReponseEntity {
- return ResponseEntity.status(HttpStatus.OK).body("Hello World!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement