No identifier specified for entity: com.XXX.XXX...

这种情况一般是没有在属性上加@Id注解导致的。

@Entity
@Data
@Table(name = "hl_role_module")
public class RoleModule {
    @Id
    private String roleId;
    private String moduleId;
}

  

原文地址:https://www.cnblogs.com/super-hu/p/11855198.html