1
|
< span style = "font-family:arial,
helvetica, sans-serif;" >< security:authentication-manager >< br >
< security:authentication-provider user-service-ref = "favUserDetailService" >< br >
</ security:authentication-provider >< br >
</ security:authentication-manager >< br >< br >
< bean id = "favUserDetailService" class = "com.favccxx.favsecurity.security.FavUserDetailService" />< br ></ span > |
1
|
<span
style= "font-family:arial,
helvetica, sans-serif;" > package com.favccxx.favsecurity.security;<br><br> import java.util.ArrayList;<br> import java.util.Collection;<br> import java.util.List;<br><br> import org.apache.logging.log4j.LogManager;<br> import org.apache.logging.log4j.Logger;<br> import org.springframework.security.core.GrantedAuthority;<br> import org.springframework.security.core.authority.SimpleGrantedAuthority;<br> import org.springframework.security.core.userdetails.User;<br> import org.springframework.security.core.userdetails.UserDetails;<br> import org.springframework.security.core.userdetails.UserDetailsService;<br> import org.springframework.security.core.userdetails.UsernameNotFoundException;<br><br> public class FavUserDetailService implements UserDetailsService
{<br><br> private static final Logger
logger = LogManager.getLogger(FavUserDetailService. class );<br><br> /**<br>
* 根据用户名获得用户 - 用户的角色、权限等信息<br> */ <br>
------分隔线----------------------------
------分隔线----------------------------
最新技术推荐 |