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