package com.nroad.heartserver.model;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Collection;
/**
* Operator entity. @author MyEclipse Persistence Tools
*/
@Entity
@Table(name = "operator", schema = "heart_server")
public class Operator implements UserDetails {
// Property accessors
@Id
@Column(unique = true, nullable = false, length = 32)
private String username;
@Column(length = 32)
@Enumerated(EnumType.STRING)
private ROLE role;
@Column(length = 32)
private String password;
@Column(length = 8)
private String addPerson;
@Column( length = 23)
private Timestamp addDate;
// Constructors
/**
* default constructor
*/
public Operator() {
}
/**
* minimal constructor
*/
public Operator(String username) {
this.username = username;
}
/**
* full constructor
*/
public Operator(String username, ROLE role, String password, String addPerson, Timestamp addDate) {
this.username = username;
this.role = role;
this.password = password;
this.addPerson = add
spring security 重复登陆了
最新推荐文章于 2022-04-24 17:55:59 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)