Skip to content

Instantly share code, notes, and snippets.

@mkuehle
Created October 20, 2016 09:49
Show Gist options
  • Save mkuehle/2db5e4f788b206976577627a7f62df09 to your computer and use it in GitHub Desktop.
Save mkuehle/2db5e4f788b206976577627a7f62df09 to your computer and use it in GitHub Desktop.
Java EE 7 - JAX-RS Bean Validation - DTO Validaierung bei POST
@Path("/users")
public class UserResource {
@POST
@Path("/")
public User createUser(@Valid User user) {
user.setId(1l);
return user;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment