这是我之前的问题 Spring and Hibernate - changed dialect的一些后续
例如,如果我有这段 .xml
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
<property name="persistenceUnitName" value="SpringMVCTest" />
<property name="jpaProperties">
<props>
<prop key="hibernate.dialect" >
</prop>
</props>
</property>
</bean>
现在,我想设置hibernate.dialect
为 jndi by 公开的值jdbc/dialect
,但是当我<jee:jndi-lookup jndi-name="jdbc/MyDataSource"/>
输入时我得到了Invalid content was found starting with element 'jee:jndi-lookup'. No child element is expected at this
,所以我怀疑我不能在prop
.
那么,有什么方法可以将 jndi 资源插入此属性?