引起:org.springframework.beans.factory.BeanCreationException:创建名为'repository'的bean时出错

时间:2018-05-15 05:37:51

标签: java apache

我遇到了这个错误:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not a 
-----
-----
Caused by: java.lang.IllegalArgumentException: Not a managed type: class com.deck.microFin.entity.UserMstr
    at org.hibernate.jpa.internal.metamodel.MetamodelImpl.managedType(MetamodelImpl.java:210)

以下是我的存储库Java类:

@org.springframework.stereotype.Repository
public interface Repository extends JpaRepository<CompanyMstr, Long> {

我的实体类是这样的:

@MappedSuperclass
@Table(name = "user_mstr", schema = "admin")
@XmlRootElement
public class UserMstr implements Serializable {

我错过了什么?

0 个答案:

没有答案