根据内容: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
|
||||
*/
|
||||
|
||||
|
||||
@Entity
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Accessors(chain = true)
|
||||
//@Table(name = "person", uniqueConstraints = {@UniqueConstraint(columnNames = "user_name"), @UniqueConstraint(columnNames = "user_email")})
|
||||
public class Person extends AbstractPersistable<Long> {
|
||||
|
||||
@NotBlank
|
||||
@NotBlank
|
||||
@Size(max = 20)
|
||||
private String userName;
|
||||
|
||||
@NotBlank
|
||||
@NotBlank
|
||||
@Size(max = 120)
|
||||
private String userPassword;
|
||||
|
||||
@NotBlank
|
||||
@NotBlank
|
||||
@Email
|
||||
private String userEmail;
|
||||
|
||||
|
|
|
@ -2,12 +2,15 @@ package com.ossez.spring.security.models.entity;
|
|||
|
||||
import com.ossez.spring.security.models.ERole;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.data.jpa.domain.AbstractPersistable;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
@Getter
|
||||
@Setter
|
||||
public class PersonRole extends AbstractPersistable<Long> {
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||
|
|
Loading…
Reference in New Issue