KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm using Spring Security 3 and Spring MVC 3.05. I would like to print username of currently logged in user,how can I fetch UserDetails in my Controller? @RequestMapping(value="/index.html", method=RequestMethod.GET) public ModelAndView indexView(){ UserDetails user = ? mv.addObject("username", user.getUsername()); ModelAndView mv = new ModelAndView("index"); return mv; }
Tags (comma-separated)
Save Edits
Cancel