Created
January 10, 2018 16:42
-
-
Save finsterthecat/ecccca22f2cff7c0fc62b27762e6434a 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
@PostMapping(consumes = "application/json", produces = "application/json") | |
@ResponseStatus(HttpStatus.CREATED) | |
public Hero createHero(Hero hero) { | |
LOG.debug("createHero: {}", hero.getName()); | |
Hero createdHero = heroRepository.save(hero); | |
LOG.debug("Created hero {} with id {}", createdHero.getName(), createdHero.getId()); | |
return createdHero; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment