在运行springboot应用程序时,异常即将到来。
引起:org.hibernate.AnnotationException:没有为entity指定标识符:com.model.Location
@Entity
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
@Table(name = "LOCATION", schema = "LOCK")
public class Location implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "LOCATION_ID")
private int locationId;
@Column(name = "LOCATION", nullable = false)
private String location;
@Column(name = "CREATED_ON", nullable = false)
private Timestamp CREATED_ON;
@Column(name = "UPDATED_ON", nullable = false)
private Timestamp UPDATED_ON;
/*getter setter methods*/
}