Skip to content

Instantly share code, notes, and snippets.

@brunokrebs
Last active March 10, 2016 13:58
Show Gist options
  • Save brunokrebs/d57e354d42d68b85686f to your computer and use it in GitHub Desktop.
Save brunokrebs/d57e354d42d68b85686f to your computer and use it in GitHub Desktop.
package br.com.brunokrebs.rest;
import br.com.brunokrebs.model.User;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class UserRest {
@RequestMapping(path = "/users/", method = RequestMethod.POST)
public User getUser(@RequestBody User user) {
return user;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment