@RestController
@RequestMapping("/api")
public class BasicController
extends Object
-
Constructor Summary
Constructors
-
Method Summary
org.springframework.http.ResponseEntity<String>
org.springframework.http.ResponseEntity<String>
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
-
BasicController
public BasicController()
-
Method Details
-
sayHello
@GetMapping("/hello")
public org.springframework.http.ResponseEntity<String> sayHello()
-
sayHellopost
@PostMapping("/hello")
public org.springframework.http.ResponseEntity<String> sayHellopost(@RequestBody
String body)
-
greetUser
@GetMapping("/greet/{name}")
public org.springframework.http.ResponseEntity<String> greetUser(@PathVariable
String name,
@RequestParam(value="age",required=false)
Integer age,
@RequestParam(value="country",required=false)
String country)