问题描述
- 请问这个实体的注解写的有问题吗,为什么不能建表
-
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;@Entity(name="readdress")
public class ReAddress{
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Integer id;
private String rename;
public ReAddress() {} public ReAddress(String rename) { this.rename = rename; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getRename() { return rename; } public void setRename(String rename) { this.rename = rename; }
}
时间: 2024-11-03 04:34:12