Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.security.Principal;
@RestController
@RequestMapping("/")
public class UserRestController {
@RequestMapping(value = "user", method = RequestMethod.GET)
public Principal user(Principal user) {
return user;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment