忘了给id注解了
@Id @GeneratedValue(generator = "_native") @GenericGenerator(name = "_native", strategy = "native")
加上就解决
org.hibernate.AnnotationException: No identifier specified for entity: com.hs.model.CramSession
原文:https://www.cnblogs.com/jnhs/p/12726504.html