【发布时间】:2011-05-04 11:21:17
【问题描述】:
我正在开发一个新的 Spring+JPA2/Hibernate+Wicket 项目,想知道一些配置文件应该放在哪里?
applicationContext.xml 我在 src/main/resources/META-INF 和 src/main/resources/ 中都看到了这一点
persistence.xml 大多数时候,我在 src/main/resources/META-INF 中看到过它。就我而言,它包含以下内容:
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
version="1.0">
<persistence-unit name="ApplicationEntityManager" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
</persistence-unit>
</persistence>
web.xml 我猜 src/main/webapp/WEB-INF 是正确的地方。
【问题讨论】:
标签: hibernate spring maven-2 jpa