平时写mapping的文件需要一个一个的放到配置文件里,比如

   1. <property name="mappingResources">  
   2.             <list>  
   3.                 <value>model/Classes.hbm.xml</value>  
   4.                 <value>model/Parent.hbm.xml</value>  
   5.                 <value>model/Child.hbm.xml</value>  
   6.                 <value>model/User.hbm.xml</value>  
   7.             </list>  
   8.         </property>  



可以用更一步到位的方法:

   1. <property name="mappingLocations">  
   2.             <list>  
   3.                 <value>classpath*:/model/hbm</value>  
   4.             </list>  
   5.         </property>  
注意:具体是否有用,本人还未试过,只是突然想到这个问题,先记录下!

相关文章:

  • 2021-11-09
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-09-06
  • 2021-08-28
猜你喜欢
  • 2021-10-15
  • 2022-12-23
  • 2021-07-20
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2021-03-31
相关资源
相似解决方案