Spring 其中应添加includeSynoyms=true连接属性
我们在Spring 其中应添加includeSynoyms=true连接属性,spring,oracle,hibernate,tomcat,jdbc,Spring,Oracle,Hibernate,Tomcat,Jdbc,我们在Oracle数据库中使用同义词。因此,hibernate.hbm2ddl.auto=validate不起作用。因此,为了解决这个问题,我添加了hibernate.synonyms=true,但它也不能完全工作。当我在线搜索解决方案时,我知道我必须将includesynoyms=true添加到JDBC连接属性中。我的应用程序设置有hibernate ApplicationContext.xml文件,所以我尝试添加hibernate属性,但没有成功 错误是表[表]中缺少列[列] 有人能建议我在
Oracle
数据库中使用同义词。因此,hibernate.hbm2ddl.auto=validate
不起作用。因此,为了解决这个问题,我添加了hibernate.synonyms=true,但它也不能完全工作。当我在线搜索解决方案时,我知道我必须将includesynoyms=true
添加到JDBC
连接属性中。我的应用程序设置有hibernate ApplicationContext.xml
文件,所以我尝试添加hibernate属性
,但没有成功
错误是表[表]中缺少列[列]
有人能建议我在哪里加上这个吗
申请详情:
DB:Oracle
Server: Tomcat
frameworks: Spring(4.3), Hibernate(5.1.17) (xml and annotation configurations)
编辑:
${hibernate.hbm2ddl.auto}
${hibernate.dial}
假的
${hibernate.enable.audit}
${hibernate.enable.audit}
${hibernate.enable.audit}
org.hibernate.envers.strategy.${bdms.hibernate.strategy}
${jdbc.fetchSize}
${jdbc.batchSize}
#{validator}
真的
真的
`
数据源:${DataSource.class.name}=com.mchange.v2.c3p0.ComboPooledDataSource
<bean id="dataSource" class="${datasource.class.name}"
destroy-method="close" p:driverClass="${jdbc.driverClassName}"
p:jdbcUrl="${jdbc.url}" p:user="${jdbc.username}"
p:password="${jdbc.password}" p:initialPoolSize="${datasource.initial-pool-size}" p:maxPoolSize="${datasource.max-pool-size}"
p:acquireRetryAttempts="5" p:acquireRetryDelay="3000"
p:idleConnectionTestPeriod="300"
p:debugUnreturnedConnectionStackTraces="true"
p:maxAdministrativeTaskTime="600"
p:numHelperThreads="5"
p:testConnectionOnCheckout="${test.connection.on.checkout:false}">
</bean>`
`
共享您尝试过的配置请检查我的编辑器假设您使用的是外部数据源设置hibernate。连接
属性无效。您需要在数据源上配置该属性。我们的应用程序正在使用不接受此属性的com.mchange.v2.c3p0.ComboPooledDataSource
。在问题中添加该配置。这个答案可能有用共享您尝试过的配置请检查我的编辑器假设您使用的是外部数据源设置hibernate。连接属性无效。您需要在数据源上配置该属性。我们的应用程序正在使用不接受此属性的com.mchange.v2.c3p0.ComboPooledDataSource
。在问题中添加配置。这个答案可能有用吗
<bean id="dataSource" class="${datasource.class.name}"
destroy-method="close" p:driverClass="${jdbc.driverClassName}"
p:jdbcUrl="${jdbc.url}" p:user="${jdbc.username}"
p:password="${jdbc.password}" p:initialPoolSize="${datasource.initial-pool-size}" p:maxPoolSize="${datasource.max-pool-size}"
p:acquireRetryAttempts="5" p:acquireRetryDelay="3000"
p:idleConnectionTestPeriod="300"
p:debugUnreturnedConnectionStackTraces="true"
p:maxAdministrativeTaskTime="600"
p:numHelperThreads="5"
p:testConnectionOnCheckout="${test.connection.on.checkout:false}">
</bean>`