Привет, я получаю следующую ошибку
javax.servlet.ServletException: Cannot expose session attribute 'user' because of an existing model object of the same name
org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:141)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
код
@Controller
@RequestMapping("/admin")
@SessionAttributes("user")
public class AdminHome {
@RequestMapping("home")
public String homePage(HttpSession session, ModelMap map) {
map.addAttribute(org.brahmaa.ads.util.impl.UserInfo.getPrincipal(session));
return "admin/home";
}
}