Ejemplo n.º 1
0
 @Transactional
 @RequestMapping(path = "/user", method = RequestMethod.POST)
 public User create(@RequestBody User settings, Principal principal) {
   settings.setAccountId(principal.getName());
   return dao.save(settings);
 }
Ejemplo n.º 2
0
 @RequestMapping(path = "/user", method = RequestMethod.GET)
 public User getUserSettings(Principal principal) {
   return dao.findOneByAccountId(principal.getName());
 }