我已经在spring xml文件中配置了我的EntityManagerFactory,例如:
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="tesDataSource" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="${tes.db.database:ORACLE}"/>
<property name="showSql" value="${tes.db.showSql:false}"/>
<property name="generateDdl" value="${tes.db.generateDdl:false}"/>
<property name="databasePlatform" value="${tes.db.dialect:org.hibernate.dialect.Oracle10gDialect}"/>
</bean>
</property>
</bean>
但是我遇到了以下错误:
java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'org.springframework.orm.jpa.vendor.Database' for property 'database': no matching editors or conversion strategy found
我真的打算将此属性默认为ORACLE。请帮帮我。