diff --git a/examples/quickstart/pom.xml b/examples/quickstart/pom.xml index c17f6af50a27626e99c63952086ee625f9c6e78d..a3939eb4339888c5cfe18c866419b893cad952d4 100644 --- a/examples/quickstart/pom.xml +++ b/examples/quickstart/pom.xml @@ -664,7 +664,6 @@ refresh-db - org.apache.maven.plugins @@ -676,7 +675,7 @@ - + diff --git a/examples/quickstart/src/main/resources/applicationContext.xml b/examples/quickstart/src/main/resources/applicationContext.xml index b23fff61bcf9c77277d509b2e6eee6f77ce84bfe..3735665fbd0e2abe5a77d575fde393b7b0dfef97 100644 --- a/examples/quickstart/src/main/resources/applicationContext.xml +++ b/examples/quickstart/src/main/resources/applicationContext.xml @@ -115,7 +115,7 @@ - + @@ -136,7 +136,7 @@ - + \ No newline at end of file diff --git a/examples/quickstart/src/test/functional/org/springside/examples/quickstart/functional/BaseFunctionalTestCase.java b/examples/quickstart/src/test/functional/org/springside/examples/quickstart/functional/BaseFunctionalTestCase.java index bbdf17818dfeab14697ebb61c1706cf1148e2267..20fdf2ec406678ba185a28c2bf8142b93461585b 100644 --- a/examples/quickstart/src/test/functional/org/springside/examples/quickstart/functional/BaseFunctionalTestCase.java +++ b/examples/quickstart/src/test/functional/org/springside/examples/quickstart/functional/BaseFunctionalTestCase.java @@ -87,6 +87,8 @@ public class BaseFunctionalTestCase { * 载入测试数据. */ protected static void reloadSampleData() throws Exception { - DataFixtures.executeScript(dataSource, "classpath:data/cleanup-data.sql", "classpath:data/import-data.sql"); + String dbType = propertiesLoader.getProperty("db.type", "h2"); + DataFixtures.executeScript(dataSource, "classpath:data/" + dbType + "cleanup-data.sql", "classpath:data/" + + dbType + "import-data.sql"); } } \ No newline at end of file diff --git a/examples/quickstart/src/test/resources/application.functional.properties b/examples/quickstart/src/test/resources/application.functional.properties index 9b2905ba8cb600dc4c873d5d6ac30c859d10612e..05f9cc01dc9404d813d9f5d5d30aad7535fa8098 100644 --- a/examples/quickstart/src/test/resources/application.functional.properties +++ b/examples/quickstart/src/test/resources/application.functional.properties @@ -5,6 +5,7 @@ embeddedForLocal=true selenium.driver=firefox #(optional)override jdbc url for functional test +db.type=h2 jdbc.driver=org.h2.Driver jdbc.url=jdbc:h2:file:~/.h2/quickstart-test;AUTO_SERVER=TRUE jdbc.username=sa diff --git a/examples/quickstart/src/test/resources/data/cleanup-data.sql b/examples/quickstart/src/test/resources/data/h2/cleanup-data.sql similarity index 100% rename from examples/quickstart/src/test/resources/data/cleanup-data.sql rename to examples/quickstart/src/test/resources/data/h2/cleanup-data.sql diff --git a/examples/quickstart/src/test/resources/data/import-data.sql b/examples/quickstart/src/test/resources/data/h2/import-data.sql similarity index 100% rename from examples/quickstart/src/test/resources/data/import-data.sql rename to examples/quickstart/src/test/resources/data/h2/import-data.sql diff --git a/examples/showcase/pom.xml b/examples/showcase/pom.xml index b6558f76f69368abcb5a0cd9945b1ed121800190..1bba278509e44a54f6b54757889cefc15b7e4508 100644 --- a/examples/showcase/pom.xml +++ b/examples/showcase/pom.xml @@ -548,7 +548,7 @@ - + diff --git a/examples/showcase/src/main/resources/applicationContext.xml b/examples/showcase/src/main/resources/applicationContext.xml index 183c60011afa401b79cee4d9af9f0e39f50b241f..6082d5b69c68abd0842f3e78c9ea6665b79fc071 100644 --- a/examples/showcase/src/main/resources/applicationContext.xml +++ b/examples/showcase/src/main/resources/applicationContext.xml @@ -153,11 +153,11 @@ - + - + @@ -186,7 +186,7 @@ - + diff --git a/examples/showcase/src/test/functional/org/springside/examples/showcase/functional/BaseFunctionalTestCase.java b/examples/showcase/src/test/functional/org/springside/examples/showcase/functional/BaseFunctionalTestCase.java index c27301ebc83e0214d8d3efc9175196f81521e7de..3e00161a19af0d5204b6cb487145ecbd8695512f 100644 --- a/examples/showcase/src/test/functional/org/springside/examples/showcase/functional/BaseFunctionalTestCase.java +++ b/examples/showcase/src/test/functional/org/springside/examples/showcase/functional/BaseFunctionalTestCase.java @@ -81,6 +81,8 @@ public class BaseFunctionalTestCase { * 载入默认数据. */ protected static void reloadSampleData() throws Exception { - DataFixtures.executeScript(dataSource, "classpath:data/cleanup-data.sql", "classpath:data/import-data.sql"); + String dbType = propertiesLoader.getProperty("db.type", "h2"); + DataFixtures.executeScript(dataSource, "classpath:data/" + dbType + "cleanup-data.sql", "classpath:data/" + + dbType + "import-data.sql"); } } diff --git a/examples/showcase/src/test/resources/application.functional.properties b/examples/showcase/src/test/resources/application.functional.properties index c81675ff450350310b9094f8f41a56e906da5c8b..86d0b8eb455c62a0e6f65635b94047efa6a09641 100644 --- a/examples/showcase/src/test/resources/application.functional.properties +++ b/examples/showcase/src/test/resources/application.functional.properties @@ -5,6 +5,7 @@ embeddedForLocal=true selenium.driver=firefox #(optional)override jdbc url for functional test +db.type=h2 jdbc.driver=org.h2.Driver jdbc.url=jdbc:h2:file:~/.h2/showcase4-test;AUTO_SERVER=TRUE jdbc.username=sa diff --git a/examples/showcase/src/test/resources/data/cleanup-data.sql b/examples/showcase/src/test/resources/data/h2/cleanup-data.sql similarity index 100% rename from examples/showcase/src/test/resources/data/cleanup-data.sql rename to examples/showcase/src/test/resources/data/h2/cleanup-data.sql diff --git a/examples/showcase/src/test/resources/data/import-data.sql b/examples/showcase/src/test/resources/data/h2/import-data.sql similarity index 100% rename from examples/showcase/src/test/resources/data/import-data.sql rename to examples/showcase/src/test/resources/data/h2/import-data.sql