根据内容:https://www.ossez.com/t/spring-lombok/14129 修改实体类死循环问题
This commit is contained in:
parent
efbefa7902
commit
82161ce5b4
|
@ -17,22 +17,23 @@ import java.util.Set;
|
||||||
* @author YuCheng Hu
|
* @author YuCheng Hu
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@Entity
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Entity
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
//@Table(name = "person", uniqueConstraints = {@UniqueConstraint(columnNames = "user_name"), @UniqueConstraint(columnNames = "user_email")})
|
//@Table(name = "person", uniqueConstraints = {@UniqueConstraint(columnNames = "user_name"), @UniqueConstraint(columnNames = "user_email")})
|
||||||
public class Person extends AbstractPersistable<Long> {
|
public class Person extends AbstractPersistable<Long> {
|
||||||
|
|
||||||
@NotBlank
|
@NotBlank
|
||||||
@Size(max = 20)
|
@Size(max = 20)
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
@NotBlank
|
@NotBlank
|
||||||
@Size(max = 120)
|
@Size(max = 120)
|
||||||
private String userPassword;
|
private String userPassword;
|
||||||
|
|
||||||
@NotBlank
|
@NotBlank
|
||||||
@Email
|
@Email
|
||||||
private String userEmail;
|
private String userEmail;
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,15 @@ package com.ossez.spring.security.models.entity;
|
||||||
|
|
||||||
import com.ossez.spring.security.models.ERole;
|
import com.ossez.spring.security.models.ERole;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
import org.springframework.data.jpa.domain.AbstractPersistable;
|
import org.springframework.data.jpa.domain.AbstractPersistable;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Data
|
@Getter
|
||||||
|
@Setter
|
||||||
public class PersonRole extends AbstractPersistable<Long> {
|
public class PersonRole extends AbstractPersistable<Long> {
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||||
|
|
Loading…
Reference in New Issue