日期:2014-05-20 浏览次数:20672 次
package com.shadow.system.base.mvc;
import java.util.Collection;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
/**
* 安全用户实体
*
* @author shadow
*
*/
@SuppressWarnings("serial")
public abstract class AbstractUser implements UserDetails {
// ===========以下属性为安全架构属性===========
private String username; // 账号
private String password; // 密码
private boolean accountNonExpired = true; // 账号是否过期
private boolean accountNonLocked = true; // 账号是否锁定
private boolean credentialsNonExpired = true; //
private boolean enabled = true; // 是否可用
private Collection<? extends GrantedAuthority> authorities; // 权限集合
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {