hibernate 4 - sessionFactory.addPackage - 配置文件模拟



我认为在Hibernate 3中有一个属性键hibernate.packagesToScan
哪一个可以在hibernate.cfg.xml的会话工厂级别设置.
这个键在Hibernate 4中是否发生了变化,如果是,它对应的键是什么?

我使用的是 4.3.8 最终版本。

在休眠属性中,您需要:

<property name="hibernate.archive.autodetection" value="class, hbm" />

在持久性中.xml您需要:

<exclude-unlisted-classes>false</exclude-unlisted-classes>

最新更新