Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
workflow
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
workflow
Commits
120b53ca
Commit
120b53ca
authored
Sep 13, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
cd5a8e42
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
26 deletions
+9
-26
TestApplication.java
src/main/java/com/egolm/workflow/test/TestApplication.java
+9
-1
TestConfig.java
src/main/java/com/egolm/workflow/test/TestConfig.java
+0
-25
No files found.
src/main/java/com/egolm/workflow/test/TestApplication.java
View file @
120b53ca
...
@@ -8,8 +8,11 @@ import java.util.Map;
...
@@ -8,8 +8,11 @@ import java.util.Map;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.dialect.SqlServerDialect
;
import
com.egolm.workflow.AbstractOpenApi
;
import
com.egolm.workflow.AbstractOpenApi
;
import
com.egolm.workflow.bean.TFlowTask
;
import
com.egolm.workflow.bean.TFlowTask
;
import
com.mchange.v2.c3p0.ComboPooledDataSource
;
public
class
TestApplication
{
public
class
TestApplication
{
...
@@ -22,7 +25,12 @@ public class TestApplication {
...
@@ -22,7 +25,12 @@ public class TestApplication {
@Before
@Before
public
void
init
()
throws
PropertyVetoException
,
SQLException
{
public
void
init
()
throws
PropertyVetoException
,
SQLException
{
openApi
=
new
TestApiImpl
(
TestConfig
.
getJdbcTemplate
());
ComboPooledDataSource
ds
=
new
ComboPooledDataSource
(
"db"
);
JdbcTemplate
jdbcTemplate
=
new
JdbcTemplate
();
jdbcTemplate
.
setDataSource
(
ds
);
jdbcTemplate
.
setDialect
(
new
SqlServerDialect
());
jdbcTemplate
.
setSql_level
(
3
);
openApi
=
new
TestApiImpl
(
jdbcTemplate
);
}
}
@Test
@Test
...
...
src/main/java/com/egolm/workflow/test/TestConfig.java
deleted
100644 → 0
View file @
cd5a8e42
package
com
.
egolm
.
workflow
.
test
;
import
java.beans.PropertyVetoException
;
import
java.sql.SQLException
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.dialect.SqlServerDialect
;
import
com.mchange.v2.c3p0.ComboPooledDataSource
;
public
class
TestConfig
{
private
static
JdbcTemplate
jdbcTemplate
;
public
static
JdbcTemplate
getJdbcTemplate
()
throws
PropertyVetoException
,
SQLException
{
if
(
jdbcTemplate
==
null
)
{
ComboPooledDataSource
ds
=
new
ComboPooledDataSource
(
"db"
);
jdbcTemplate
=
new
JdbcTemplate
();
jdbcTemplate
.
setDataSource
(
ds
);
jdbcTemplate
.
setDialect
(
new
SqlServerDialect
());
jdbcTemplate
.
setSql_level
(
3
);
}
return
jdbcTemplate
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment