我正在尝试创建用于访问Crud存储库接口的通用接口,我的代码如下
public interface Repository<T extends BaseClass,I> extends CrudRepository<T, I>{
}
Repository<User,Long> repository;
@MappedSuperclass
public class BaseClass {
@Id
Long user_id;
protected BaseClass(){}
}
@Entity
@Table(name="users")
public class User extends BaseClass{
private String user_name;
private String user_type;
``
this way I am creating repository instance but while starting the application it is giving exception
Invocation of init method failed; nested exception is org.hibernate.UnknownEntityTypeException: Unable to locate persister xx.xx.BaseClass