是配置文件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" />