Externalise location of scripts to initialise database

This commit is contained in:
dsyer
2007-12-12 23:27:05 +00:00
parent 445ae1637a
commit a583e068cf
3 changed files with 7 additions and 3 deletions

View File

@@ -11,11 +11,14 @@ batch.jndi.name=
batch.naming.factory.initial=
batch.naming.provider.url=
batch.database.vendor=HSQLDB
batch.schema.script=schema-hsqldb.sql
batch.business.schema.script=business-schema-hsqldb.sql
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.HsqlMaxValueIncrementer
# Other platforms:
# org.springframework.jdbc.support.incrementer.DB2SequenceMaxValueIncrementer
# org.springframework.jdbc.support.incrementer.PostgreSQLSequenceMaxValueIncrementer
# batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.DerbyMaxValueIncrementer
# Bean Properties for override
# for HSQLDB:

View File

@@ -7,8 +7,8 @@
<property name="dataSource" ref="dataSource"/>
<property name="initScripts">
<list>
<value>schema-hsqldb.sql</value>
<value>business-schema-hsqldb.sql</value>
<value>${batch.schema.script}</value>
<value>${batch.business.schema.script}</value>
</list>
</property>
</bean>

View File

@@ -13,7 +13,8 @@
<property name="url" value="${batch.jdbc.url}" />
<property name="username" value="${batch.jdbc.user}" />
<property name="password" value="${batch.jdbc.password}" />
</bean>
</bean>
<!-- bean id="dataSource" class="test.jdbc.datasource.DerbyDataSourceFactoryBean"/-->
<bean id="sqlTransactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager" lazy-init="true">
<property name="dataSource" ref="dataSource" />