// @RequestMapping(value = "/index") @RequestMapping({"/","/index"}) public String index(Model model) { User user =(User)SecurityUtils.getSubject().getPrincipal(); model.addAttribute("username",user.getName()); return "index"; }
问题描述:
配置好所有的东西之后,我们开始登陆系统,然后用户认证通过了。但是我们的跳转路径会出错
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
错误就是这样的,
路径可能就直接是locahost:8080 后面不会存在项目路径 所以需要同映射两个mapping路径