Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Shardingsphere
提交
a8803f49
Shardingsphere
项目概览
apache
/
Shardingsphere
通知
56
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Shardingsphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a8803f49
编写于
2月 18, 2019
作者:
C
cherrylzhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
using implement scenario to declaration.
上级
6509b600
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
11 addition
and
8 deletion
+11
-8
sharding-jdbc-example/raw-jdbc-nodep-example/src/main/java/io/shardingsphere/example/jdbc/nodep/JavaConfigurationExample.java
...ngsphere/example/jdbc/nodep/JavaConfigurationExample.java
+1
-2
sharding-jdbc-example/raw-jdbc-nodep-example/src/main/java/io/shardingsphere/example/jdbc/nodep/JavaConfigurationTransactionExample.java
...ample/jdbc/nodep/JavaConfigurationTransactionExample.java
+2
-1
sharding-jdbc-example/raw-jdbc-nodep-example/src/main/java/io/shardingsphere/example/jdbc/nodep/YamlConfigurationExample.java
...ngsphere/example/jdbc/nodep/YamlConfigurationExample.java
+1
-1
sharding-jdbc-example/raw-jdbc-nodep-example/src/main/java/io/shardingsphere/example/jdbc/nodep/YamlConfigurationTransactionExample.java
...ample/jdbc/nodep/YamlConfigurationTransactionExample.java
+1
-1
sharding-jdbc-example/raw-jdbc-orche-example/src/main/java/io/shardingsphere/example/jdbc/orche/JavaConfigurationTransactionExample.java
...ample/jdbc/orche/JavaConfigurationTransactionExample.java
+3
-1
sharding-jdbc-example/raw-jdbc-orche-example/src/main/java/io/shardingsphere/example/jdbc/orche/YamlConfigurationTransactionExample.java
...ample/jdbc/orche/YamlConfigurationTransactionExample.java
+3
-2
未找到文件。
sharding-jdbc-example/raw-jdbc-nodep-example/src/main/java/io/shardingsphere/example/jdbc/nodep/JavaConfigurationExample.java
浏览文件 @
a8803f49
...
...
@@ -19,7 +19,6 @@ package io.shardingsphere.example.jdbc.nodep;
import
io.shardingsphere.example.jdbc.nodep.factory.CommonServiceFactory
;
import
io.shardingsphere.example.repository.api.senario.CommonServiceScenario
;
import
io.shardingsphere.example.repository.api.senario.Scenario
;
import
io.shardingsphere.example.type.ShardingType
;
import
java.sql.SQLException
;
...
...
@@ -36,7 +35,7 @@ public class JavaConfigurationExample {
// private static ShardingType type = ShardingType.SHARDING_MASTER_SLAVE;
public
static
void
main
(
final
String
[]
args
)
throws
SQLException
{
Scenario
scenario
=
new
CommonServiceScenario
(
CommonServiceFactory
.
newInstance
(
type
));
CommonService
Scenario
scenario
=
new
CommonServiceScenario
(
CommonServiceFactory
.
newInstance
(
type
));
scenario
.
executeShardingCRUDSuccess
();
}
}
sharding-jdbc-example/raw-jdbc-nodep-example/src/main/java/io/shardingsphere/example/jdbc/nodep/JavaConfigurationTransactionExample.java
浏览文件 @
a8803f49
...
...
@@ -20,6 +20,7 @@ package io.shardingsphere.example.jdbc.nodep;
import
io.shardingsphere.example.jdbc.nodep.factory.CommonTransactionServiceFactory
;
import
io.shardingsphere.example.repository.api.senario.Scenario
;
import
io.shardingsphere.example.repository.api.senario.TransactionServiceScenario
;
import
io.shardingsphere.example.repository.api.service.TransactionService
;
import
io.shardingsphere.example.type.ShardingType
;
import
java.sql.SQLException
;
...
...
@@ -38,7 +39,7 @@ public class JavaConfigurationTransactionExample {
// private static boolean isRangeSharding = true;
public
static
void
main
(
final
String
[]
args
)
throws
SQLException
{
Scenario
scenario
=
new
TransactionServiceScenario
(
CommonTransactionServiceFactory
.
newInstance
(
type
));
TransactionService
Scenario
scenario
=
new
TransactionServiceScenario
(
CommonTransactionServiceFactory
.
newInstance
(
type
));
scenario
.
executeShardingCRUDSuccess
();
scenario
.
executeShardingCRUDFailure
();
}
...
...
sharding-jdbc-example/raw-jdbc-nodep-example/src/main/java/io/shardingsphere/example/jdbc/nodep/YamlConfigurationExample.java
浏览文件 @
a8803f49
...
...
@@ -37,7 +37,7 @@ public class YamlConfigurationExample {
// private static ShardingType type = ShardingType.SHARDING_MASTER_SLAVE;
public
static
void
main
(
final
String
[]
args
)
throws
SQLException
,
IOException
{
Scenario
scenario
=
new
CommonServiceScenario
(
YamlCommonServiceFactory
.
newInstance
(
type
));
CommonService
Scenario
scenario
=
new
CommonServiceScenario
(
YamlCommonServiceFactory
.
newInstance
(
type
));
scenario
.
executeShardingCRUDSuccess
();
}
}
sharding-jdbc-example/raw-jdbc-nodep-example/src/main/java/io/shardingsphere/example/jdbc/nodep/YamlConfigurationTransactionExample.java
浏览文件 @
a8803f49
...
...
@@ -37,7 +37,7 @@ public class YamlConfigurationTransactionExample {
// private static ShardingType type = ShardingType.SHARDING_MASTER_SLAVE;
public
static
void
main
(
final
String
[]
args
)
throws
SQLException
,
IOException
{
Scenario
scenario
=
new
TransactionServiceScenario
(
YamlCommonTransactionServiceFactory
.
newInstance
(
type
));
TransactionService
Scenario
scenario
=
new
TransactionServiceScenario
(
YamlCommonTransactionServiceFactory
.
newInstance
(
type
));
scenario
.
executeShardingCRUDSuccess
();
scenario
.
executeShardingCRUDFailure
();
}
...
...
sharding-jdbc-example/raw-jdbc-orche-example/src/main/java/io/shardingsphere/example/jdbc/orche/JavaConfigurationTransactionExample.java
浏览文件 @
a8803f49
...
...
@@ -20,6 +20,7 @@ package io.shardingsphere.example.jdbc.orche;
import
io.shardingsphere.example.jdbc.orche.factory.CommonTransactionServiceFactory
;
import
io.shardingsphere.example.repository.api.senario.Scenario
;
import
io.shardingsphere.example.repository.api.senario.TransactionServiceScenario
;
import
io.shardingsphere.example.repository.api.service.TransactionService
;
import
io.shardingsphere.example.type.RegistryCenterType
;
import
io.shardingsphere.example.type.ShardingType
;
...
...
@@ -43,7 +44,8 @@ public class JavaConfigurationTransactionExample {
// private static boolean loadConfigFromRegCenter = true;
public
static
void
main
(
final
String
[]
args
)
throws
Exception
{
Scenario
scenario
=
new
TransactionServiceScenario
(
CommonTransactionServiceFactory
.
newInstance
(
shardingType
,
registryCenterType
,
loadConfigFromRegCenter
));
TransactionService
transactionService
=
CommonTransactionServiceFactory
.
newInstance
(
shardingType
,
registryCenterType
,
loadConfigFromRegCenter
);
TransactionServiceScenario
scenario
=
new
TransactionServiceScenario
(
transactionService
);
scenario
.
executeShardingCRUDSuccess
();
scenario
.
executeShardingCRUDFailure
();
}
...
...
sharding-jdbc-example/raw-jdbc-orche-example/src/main/java/io/shardingsphere/example/jdbc/orche/YamlConfigurationTransactionExample.java
浏览文件 @
a8803f49
...
...
@@ -18,8 +18,8 @@
package
io.shardingsphere.example.jdbc.orche
;
import
io.shardingsphere.example.jdbc.orche.factory.YamlCommonTransactionServiceFactory
;
import
io.shardingsphere.example.repository.api.senario.Scenario
;
import
io.shardingsphere.example.repository.api.senario.TransactionServiceScenario
;
import
io.shardingsphere.example.repository.api.service.TransactionService
;
import
io.shardingsphere.example.type.RegistryCenterType
;
import
io.shardingsphere.example.type.ShardingType
;
...
...
@@ -43,7 +43,8 @@ public class YamlConfigurationTransactionExample {
// private static boolean loadConfigFromRegCenter = true;
public
static
void
main
(
final
String
[]
args
)
throws
Exception
{
Scenario
scenario
=
new
TransactionServiceScenario
(
YamlCommonTransactionServiceFactory
.
newInstance
(
shardingType
,
registryCenterType
,
loadConfigFromRegCenter
));
TransactionService
transactionService
=
YamlCommonTransactionServiceFactory
.
newInstance
(
shardingType
,
registryCenterType
,
loadConfigFromRegCenter
);
TransactionServiceScenario
scenario
=
new
TransactionServiceScenario
(
transactionService
);
scenario
.
executeShardingCRUDSuccess
();
scenario
.
executeShardingCRUDFailure
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录