I use Oracle in production environment and I would like to use H2 for testing. I can type;
<jdbc:embedded-database id="dataSource">
<jdbc:script location="classpath:schema.sql"/>
<jdbc:script location="classpath:test-data.sql"/>
</jdbc:embedded-database>
so my tables and scripts are created automatically. But I cannot set URL value of this db. (For H2-Oracle compatibility I should add ;MODE=Oracle to url part)
is there a way to achieve this goal?
Or just an opposite solution;
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.h2.Driver"/>
<property name="url" value="jdbc:h2:file:h2\db"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
</bean>
in this time, I can edit URL part, but how can I load default test scripts (create and data sqls) to this datasource?