Last active
March 1, 2021 10:40
-
-
Save Enigo/bba3e1ac4ac0794bc472137898967a02 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
@RequestMapping(path = "/zoo") | |
public class ZooController { | |
@PostMapping(path = "/add", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) | |
public String addAnimal(@RequestBody String payload) { | |
return "OK from post addAnimal"; | |
} | |
@GetMapping(path = "/all") | |
public Collection<String> getAnimals() { | |
return List.of("OK from getAnimals"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment