Fixed the datasource configuration for flyway.
Change-Id: If8ae360d32362c38b3f4348008e1b5f79493b070
diff --git a/src/main/resources/default-config.xml b/src/main/resources/default-config.xml
index 0a95416..04edb7d 100644
--- a/src/main/resources/default-config.xml
+++ b/src/main/resources/default-config.xml
@@ -74,13 +74,28 @@
<property name="maxWaitMillis" value="15000"/>
<!--<property name="poolPreparedStatements" value="true"/>-->
</bean>
+
+ <bean id="flywayDataSource"
+ class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
+ lazy-init="true">
+ <property name="driverClassName" value="${jdbc.driverClassName}"/>
+ <property name="url" value="${jdbc.url}"/>
+ <property name="username" value="${jdbc.username}"/>
+ <property name="password" value="${jdbc.password}"/>
+ <!-- relevant for single connection datasource and sqlite -->
+ <!-- <property name="suppressClose">
+ <value>true</value>
+ </property> -->
+ <!--<property name="initialSize" value="2"/>-->
+ <!--<property name="poolPreparedStatements" value="true"/>-->
+ </bean>
<!-- to configure database for sqlite, mysql, etc. migrations -->
<bean id="flyway" class="org.flywaydb.core.Flyway" init-method="migrate">
<property name="baselineOnMigrate" value="false"/>
<property name="locations"
value="${jdbc.schemaPath}"/>
- <property name="dataSource" ref="dataSource"/>
+ <property name="dataSource" ref="flywayDataSource"/>
</bean>
<bean id="kustvakt_db"
diff --git a/src/main/resources/ehcache.xml b/src/main/resources/ehcache.xml
index 3d999e1..17cff24 100644
--- a/src/main/resources/ehcache.xml
+++ b/src/main/resources/ehcache.xml
@@ -1,5 +1,5 @@
<ehcache xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
- xsi:noNamespaceSchemaLocation='http://ehcache.org/ehcache.xsd'>
+ xsi:schemaLocation='http://ehcache.org/ehcache.xsd'>
<defaultCache eternal='true' overflowToDisk='false'/>
<!--maxBytesLocalHeap="200M"-->
<diskStore path="./cache_store"/>