首页 > getUserPrincipal() 这个方法到底是做什么用的?

getUserPrincipal() 这个方法到底是做什么用的?

在网上查getUserPrincipal() 这个方法,说认证后可得到用户标识。那么请问这个认证指的是登录吗?


就是用户登录用的。

你可以看一看目前的一些登录认证的框架:例如Spring Security、Shiro、CAS
http://docs.spring.io/spring-security/site/docs/4.1.0.RELEASE/reference/htmlsingle/#servletapi-25

【热门文章】
【热门文章】