[英]one mapping folder for all hibernate hbm.xml files
如果我所有的hbm.xml文件都放在一個文件夾中
我嘗試使我的hibernate.cfg.xml
然后在此文件夾中查找(不添加一個一的hbm.xml資源),所以我添加:
<mapping resource="*.hbm.xml"/>
但他吐:
failed.org.hibernate.MappingNotFoundException: resource: *.hbm.xml not found
但是如果我放
<mapping resource="testobj.hbm.xml"/>
它工作正常。
方式?
提前致謝。
如果將JPA與hibernate一起用作實現,則可以將hibernate.archive.autodetection
屬性配置為hbm
以啟用對hbm.xml
文件的自動發現。
檢查一下 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.