是配置文件hibernate.cfg.xml还是其它持久类映射文件啊(users.hbm.xml)啊?多配置:
//在获得session工厂时
sessionFactory = new Configuration().configure("这指定不同的配置文件名").buildSessionFactory();多个映射文件:
//在hibernate.cfg.xml中加入,多个标签,如下所例:
<mapping resource="com/examples/domain/Article.hbm.xml" />
<mapping resource="com/examples/domain/TsUsers.hbm.xml" />
//在获得session工厂时
sessionFactory = new Configuration().configure("这指定不同的配置文件名").buildSessionFactory();多个映射文件:
//在hibernate.cfg.xml中加入,多个标签,如下所例:
<mapping resource="com/examples/domain/Article.hbm.xml" />
<mapping resource="com/examples/domain/TsUsers.hbm.xml" />
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货