EclipseLink是否具有与openjpa.properties等效的东西,让我指定persistence.xml的位置?
调整类路径以查找persistence.xml是EclipseLink的唯一选项吗?
FWIW这是一个Spring 4.应用程序
TIA。
答案 0 :(得分:1)
基于Spring的应用程序的答案是
<tx:annotation-driven mode="aspectj" transaction-manager="transactionManager" />
<bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory">
<property name="persistenceUnitName" value="persistenceUnit" />
<property name="persistenceXmlLocation" value="file:<Path to your persistence.xml>" />
<property name="dataSource" ref="dataSource" />
</bean>