org.hibernate.AnnotationException: No identifier specified for entity - even when it was
I had the following
import org.springframework.data.annotation.Id;
Naturally, it should be:
import javax.persistence.Id;
Thanks to @JB Nizet
I faced the same error.I solved it and figured out i didn't put @Id annotations in id field in my Entity class.
@Entity
@Table(name="geonames")
public class Geoname implements Serializable {
@Column(name="geonameid")
private Long geonameid = null;
}