Skip to content

Instantly share code, notes, and snippets.

@hinunbi
Created May 4, 2020 14:46
Show Gist options
  • Save hinunbi/4999a93603a99a93ad85ff75420ad2e2 to your computer and use it in GitHub Desktop.
Save hinunbi/4999a93603a99a93ad85ff75420ad2e2 to your computer and use it in GitHub Desktop.
package com.demo;
import lombok.extern.slf4j.Slf4j;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@Slf4j
@Path("/userinfo")
public class UserInfoResource {
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public UserInfo hello(UserInfo userInfo) {
log.info("Received : " + userInfo);
return userInfo;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment