Not to aのbeanクラスがあります。と を使用しました。しかし、次のとおりです。私が使用した
クラスはで導入されています。 mappeddatabase tablecreateSqlQueryaddEntitymapping the result seterrorunknown entitysetResultSetMappingerrorunknown entity.beanhibernate.cfg.xml
ありがとう。
Not to aのbeanクラスがあります。と を使用しました。しかし、次のとおりです。私が使用した
クラスはで導入されています。 mappeddatabase tablecreateSqlQueryaddEntitymapping the result seterrorunknown entitysetResultSetMappingerrorunknown entity.beanhibernate.cfg.xml
ありがとう。
マッピングを確認してください-不明なクラス(CodeTemplate)への参照がある可能性があります。
2つの解決方法があります
第 1 の方法:
クラスを追加する必要が@EntityありPojoます。これにより、pojo が JPA エンティティになります。
第二に、構成を使用して:
Configuration の代わりに AnnotationConfiguration を使用してから呼び出す必要があります
configuration.addAnnotatedClass(YourClass.class);
@エンティティを参照
Specifies that the class is an entity. This annotation is applied
to the entity class.