【发布时间】:2012-08-29 13:54:40
【问题描述】:
这是对我之前的问题的一点跟进 Spring and Hibernate - changing 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 通过 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,所以我怀疑我不能在 @ 中放置任何标签987654327@。
那么,有什么办法可以将 jndi 资源插入到这个属性中?
【问题讨论】:
标签: spring properties jndi