如果我们想让 secrect 这个字段不被持久化,可以使用 @Transient 关键字声明。 一般使用注解的方式比较多。
Entity(name="USER")
public class User {
......
@Transient
private String secrect; // not persistent because of @Transient
}

如果我们想让 secrect 这个字段不被持久化,可以使用 @Transient 关键字声明。 一般使用注解的方式比较多。
Entity(name="USER")
public class User {
......
@Transient
private String secrect; // not persistent because of @Transient
}