大体思路就2种:自己动手获取、使用security标签库显示;
①在自己编写的业务处理方法中获取用户名:SecurityContextHolder.getContext().getAuthentication().getName();
②在自己编写的JSP页面中,使用Security提供的JSP动态标签库:<security:authentication property=”principal.username”/>,或者<security:authentication property=”name”/>