笔者在整理Spring Boot2.0系列教程时候,整合spring data jpa时遇到一个注解错误。
错误信息如下:
Caused by: org.hibernate.AnnotationException: No identifier specified for entity: com.boot.model.Student
解决方案:
import org.springframework.data.annotation.Id;
换为
import javax.persistence.*;