Java
0
Вклад в тег
public String saveUser(@ModelAttribute("currentUser") User user,Model model, Principal principal) {
User tempUser = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
tempUser.setEmail(user.getEmail());
tempUser.setUsername(user.getUsername());
userService.save(tempUser);