I am creating a Basic Spring Web application that involves a User logging in and entering their personal dashboard. I have utilised the Default Spring Security Login form when the "login" url is instantiated through the controller. What I would like the know is, how do I retrieve the users personal account information which just logged in from the database? This is what I had in the controller class when the login url had been instantiated
@RequestMapping("dashboard")
public String goDashboard(Model model){
model.addAttribute("user", new User());
return "dashboard"; // this is just returning the viewResolver JSP page
}
I am assuming the above is incorrect, as I personally think that making a new Object is wrong and will give me null values. When I login and try to display using:<c:out value="${user.username}" />
Nothing gets displayed.