Invocation of init method failed; nested exception is
org.hibernate.AnnotationException: No identifier specified for entity:
新添加了一個實體類,報以上錯誤。原因是我添加的@Id註解導入的包有誤,
@Id不用導入spring下的包,如下的導入是造成錯誤的原因。
把上面的代碼刪除即可。
Invocation of init method failed; nested exception is
org.hibernate.AnnotationException: No identifier specified for entity:
新添加了一個實體類,報以上錯誤。原因是我添加的@Id註解導入的包有誤,
@Id不用導入spring下的包,如下的導入是造成錯誤的原因。
把上面的代碼刪除即可。