Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
java镜像
Springside4
提交
45e42e24
S
Springside4
项目概览
后端镜像
/
java镜像
/
Springside4
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Springside4
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
45e42e24
编写于
1月 20, 2013
作者:
C
Calvin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
数据初始化的SQL分类型,以支持对远程的真实数据库执行functional test
上级
bc404eb6
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
15 addition
and
10 deletion
+15
-10
examples/quickstart/pom.xml
examples/quickstart/pom.xml
+1
-2
examples/quickstart/src/main/resources/applicationContext.xml
...ples/quickstart/src/main/resources/applicationContext.xml
+2
-2
examples/quickstart/src/test/functional/org/springside/examples/quickstart/functional/BaseFunctionalTestCase.java
...xamples/quickstart/functional/BaseFunctionalTestCase.java
+3
-1
examples/quickstart/src/test/resources/application.functional.properties
...tart/src/test/resources/application.functional.properties
+1
-0
examples/quickstart/src/test/resources/data/h2/cleanup-data.sql
...es/quickstart/src/test/resources/data/h2/cleanup-data.sql
+0
-0
examples/quickstart/src/test/resources/data/h2/import-data.sql
...les/quickstart/src/test/resources/data/h2/import-data.sql
+0
-0
examples/showcase/pom.xml
examples/showcase/pom.xml
+1
-1
examples/showcase/src/main/resources/applicationContext.xml
examples/showcase/src/main/resources/applicationContext.xml
+3
-3
examples/showcase/src/test/functional/org/springside/examples/showcase/functional/BaseFunctionalTestCase.java
.../examples/showcase/functional/BaseFunctionalTestCase.java
+3
-1
examples/showcase/src/test/resources/application.functional.properties
...case/src/test/resources/application.functional.properties
+1
-0
examples/showcase/src/test/resources/data/h2/cleanup-data.sql
...ples/showcase/src/test/resources/data/h2/cleanup-data.sql
+0
-0
examples/showcase/src/test/resources/data/h2/import-data.sql
examples/showcase/src/test/resources/data/h2/import-data.sql
+0
-0
未找到文件。
examples/quickstart/pom.xml
浏览文件 @
45e42e24
...
@@ -664,7 +664,6 @@
...
@@ -664,7 +664,6 @@
<profile>
<profile>
<id>
refresh-db
</id>
<id>
refresh-db
</id>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
...
@@ -676,7 +675,7 @@
...
@@ -676,7 +675,7 @@
<sql
driver=
"${jdbc.driver}"
url=
"${jdbc.url}"
userid=
"${jdbc.username}"
password=
"${jdbc.password}"
onerror=
"continue"
encoding=
"${project.build.sourceEncoding}"
>
<sql
driver=
"${jdbc.driver}"
url=
"${jdbc.url}"
userid=
"${jdbc.username}"
password=
"${jdbc.password}"
onerror=
"continue"
encoding=
"${project.build.sourceEncoding}"
>
<classpath
refid=
"maven.test.classpath"
/>
<classpath
refid=
"maven.test.classpath"
/>
<transaction
src=
"src/main/resources/sql/h2/schema.sql"
/>
<transaction
src=
"src/main/resources/sql/h2/schema.sql"
/>
<transaction
src=
"src/test/resources/data/import-data.sql"
/>
<transaction
src=
"src/test/resources/data/
h2/
import-data.sql"
/>
</sql>
</sql>
</target>
</target>
</configuration>
</configuration>
...
...
examples/quickstart/src/main/resources/applicationContext.xml
浏览文件 @
45e42e24
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
<!-- 初始化数据表结构 -->
<!-- 初始化数据表结构 -->
<jdbc:initialize-database
data-source=
"dataSource"
ignore-failures=
"ALL"
>
<jdbc:initialize-database
data-source=
"dataSource"
ignore-failures=
"ALL"
>
<jdbc:script
location=
"classpath:sql/
h2
/schema.sql"
/>
<jdbc:script
location=
"classpath:sql/
${db.type}
/schema.sql"
/>
</jdbc:initialize-database>
</jdbc:initialize-database>
</beans>
</beans>
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
<!-- 初始化数据表结构 与默认数据-->
<!-- 初始化数据表结构 与默认数据-->
<jdbc:initialize-database
data-source=
"dataSource"
ignore-failures=
"ALL"
>
<jdbc:initialize-database
data-source=
"dataSource"
ignore-failures=
"ALL"
>
<jdbc:script
location=
"classpath:sql/h2/schema.sql"
/>
<jdbc:script
location=
"classpath:sql/h2/schema.sql"
/>
<jdbc:script
location=
"classpath:data/import-data.sql"
encoding=
"UTF-8"
/>
<jdbc:script
location=
"classpath:data/
h2/
import-data.sql"
encoding=
"UTF-8"
/>
</jdbc:initialize-database>
</jdbc:initialize-database>
</beans>
</beans>
</beans>
</beans>
\ No newline at end of file
examples/quickstart/src/test/functional/org/springside/examples/quickstart/functional/BaseFunctionalTestCase.java
浏览文件 @
45e42e24
...
@@ -87,6 +87,8 @@ public class BaseFunctionalTestCase {
...
@@ -87,6 +87,8 @@ public class BaseFunctionalTestCase {
* 载入测试数据.
* 载入测试数据.
*/
*/
protected
static
void
reloadSampleData
()
throws
Exception
{
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
examples/quickstart/src/test/resources/application.functional.properties
浏览文件 @
45e42e24
...
@@ -5,6 +5,7 @@ embeddedForLocal=true
...
@@ -5,6 +5,7 @@ embeddedForLocal=true
selenium.driver
=
firefox
selenium.driver
=
firefox
#(optional)override jdbc url for functional test
#(optional)override jdbc url for functional test
db.type
=
h2
jdbc.driver
=
org.h2.Driver
jdbc.driver
=
org.h2.Driver
jdbc.url
=
jdbc:h2:file:~/.h2/quickstart-test;AUTO_SERVER=TRUE
jdbc.url
=
jdbc:h2:file:~/.h2/quickstart-test;AUTO_SERVER=TRUE
jdbc.username
=
sa
jdbc.username
=
sa
...
...
examples/quickstart/src/test/resources/data/cleanup-data.sql
→
examples/quickstart/src/test/resources/data/
h2/
cleanup-data.sql
浏览文件 @
45e42e24
文件已移动
examples/quickstart/src/test/resources/data/import-data.sql
→
examples/quickstart/src/test/resources/data/
h2/
import-data.sql
浏览文件 @
45e42e24
文件已移动
examples/showcase/pom.xml
浏览文件 @
45e42e24
...
@@ -548,7 +548,7 @@
...
@@ -548,7 +548,7 @@
<sql
driver=
"${jdbc.driver}"
url=
"${jdbc.url}"
userid=
"${jdbc.username}"
password=
"${jdbc.password}"
onerror=
"continue"
encoding=
"${project.build.sourceEncoding}"
>
<sql
driver=
"${jdbc.driver}"
url=
"${jdbc.url}"
userid=
"${jdbc.username}"
password=
"${jdbc.password}"
onerror=
"continue"
encoding=
"${project.build.sourceEncoding}"
>
<classpath
refid=
"maven.test.classpath"
/>
<classpath
refid=
"maven.test.classpath"
/>
<transaction
src=
"src/main/resources/sql/h2/schema.sql"
/>
<transaction
src=
"src/main/resources/sql/h2/schema.sql"
/>
<transaction
src=
"src/test/resources/data/import-data.sql"
/>
<transaction
src=
"src/test/resources/data/
h2/
import-data.sql"
/>
</sql>
</sql>
<sql
driver=
"${quartz.jdbc.driver}"
url=
"${quartz.jdbc.url}"
userid=
"${quartz.jdbc.username}"
password=
"${quartz.jdbc.password}"
encoding=
"${project.build.sourceEncoding}"
<sql
driver=
"${quartz.jdbc.driver}"
url=
"${quartz.jdbc.url}"
userid=
"${quartz.jdbc.username}"
password=
"${quartz.jdbc.password}"
encoding=
"${project.build.sourceEncoding}"
src=
"src/main/resources/sql/h2/quartz.sql"
onerror=
"continue"
>
src=
"src/main/resources/sql/h2/quartz.sql"
onerror=
"continue"
>
...
...
examples/showcase/src/main/resources/applicationContext.xml
浏览文件 @
45e42e24
...
@@ -153,11 +153,11 @@
...
@@ -153,11 +153,11 @@
<!-- 初始化数据结构 -->
<!-- 初始化数据结构 -->
<jdbc:initialize-database
data-source=
"dataSource"
ignore-failures=
"ALL"
>
<jdbc:initialize-database
data-source=
"dataSource"
ignore-failures=
"ALL"
>
<jdbc:script
location=
"classpath:sql/
h2
/schema.sql"
/>
<jdbc:script
location=
"classpath:sql/
${db.type}
/schema.sql"
/>
</jdbc:initialize-database>
</jdbc:initialize-database>
<jdbc:initialize-database
data-source=
"quartzDataSource"
ignore-failures=
"ALL"
>
<jdbc:initialize-database
data-source=
"quartzDataSource"
ignore-failures=
"ALL"
>
<jdbc:script
location=
"classpath:sql/
h2
/quartz.sql"
/>
<jdbc:script
location=
"classpath:sql/
${db.type}
/quartz.sql"
/>
</jdbc:initialize-database>
</jdbc:initialize-database>
</beans>
</beans>
...
@@ -186,7 +186,7 @@
...
@@ -186,7 +186,7 @@
<!-- 初始化数据结构与默认数据 -->
<!-- 初始化数据结构与默认数据 -->
<jdbc:initialize-database
data-source=
"dataSource"
ignore-failures=
"ALL"
>
<jdbc:initialize-database
data-source=
"dataSource"
ignore-failures=
"ALL"
>
<jdbc:script
location=
"classpath:sql/h2/schema.sql"
/>
<jdbc:script
location=
"classpath:sql/h2/schema.sql"
/>
<jdbc:script
location=
"classpath:data/import-data.sql"
encoding=
"UTF-8"
/>
<jdbc:script
location=
"classpath:data/
h2/
import-data.sql"
encoding=
"UTF-8"
/>
</jdbc:initialize-database>
</jdbc:initialize-database>
<jdbc:initialize-database
data-source=
"quartzDataSource"
ignore-failures=
"ALL"
>
<jdbc:initialize-database
data-source=
"quartzDataSource"
ignore-failures=
"ALL"
>
...
...
examples/showcase/src/test/functional/org/springside/examples/showcase/functional/BaseFunctionalTestCase.java
浏览文件 @
45e42e24
...
@@ -81,6 +81,8 @@ public class BaseFunctionalTestCase {
...
@@ -81,6 +81,8 @@ public class BaseFunctionalTestCase {
* 载入默认数据.
* 载入默认数据.
*/
*/
protected
static
void
reloadSampleData
()
throws
Exception
{
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"
);
}
}
}
}
examples/showcase/src/test/resources/application.functional.properties
浏览文件 @
45e42e24
...
@@ -5,6 +5,7 @@ embeddedForLocal=true
...
@@ -5,6 +5,7 @@ embeddedForLocal=true
selenium.driver
=
firefox
selenium.driver
=
firefox
#(optional)override jdbc url for functional test
#(optional)override jdbc url for functional test
db.type
=
h2
jdbc.driver
=
org.h2.Driver
jdbc.driver
=
org.h2.Driver
jdbc.url
=
jdbc:h2:file:~/.h2/showcase4-test;AUTO_SERVER=TRUE
jdbc.url
=
jdbc:h2:file:~/.h2/showcase4-test;AUTO_SERVER=TRUE
jdbc.username
=
sa
jdbc.username
=
sa
...
...
examples/showcase/src/test/resources/data/cleanup-data.sql
→
examples/showcase/src/test/resources/data/
h2/
cleanup-data.sql
浏览文件 @
45e42e24
文件已移动
examples/showcase/src/test/resources/data/import-data.sql
→
examples/showcase/src/test/resources/data/
h2/
import-data.sql
浏览文件 @
45e42e24
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录