parent
0c0ab97a84
commit
296099f222
3 changed files with 33 additions and 7 deletions
@ -0,0 +1,21 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:jdbc="http://www.springframework.org/schema/jdbc" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" |
||||
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd |
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd |
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd"> |
||||
|
||||
<jdbc:embedded-database id="dataSource" type="HSQL" /> |
||||
|
||||
<jdbc:initialize-database data-source="dataSource" enabled="#{properties['data.source.init']}"> |
||||
<jdbc:script location="#{properties['schema.scripts']}" /> |
||||
<jdbc:script location="#{properties['insert.scripts']}" /> |
||||
</jdbc:initialize-database> |
||||
|
||||
<util:properties id="properties"> |
||||
<prop key="schema.scripts">classpath:org/springframework/jdbc/config/db-schema.sql</prop> |
||||
<prop key="insert.scripts">classpath*:org/springframework/jdbc/config/*-data.sql</prop> |
||||
<prop key="data.source.init">true</prop> |
||||
</util:properties> |
||||
|
||||
</beans> |
Loading…
Reference in new issue