Skip to content

Commit 87633ab

Browse files
committed
取消本地注册中心
1 parent 0e86160 commit 87633ab

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

sharding-sphere/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<artifactId>sharding-jdbc-spring-boot-starter</artifactId>
3333
</dependency>
3434

35-
<!-- ShardingSphere 服务编排 -->
35+
<!-- ShardingSphere 注册配置中心 begin (直接配置文件配置的话不需要引入)-->
3636
<dependency>
3737
<groupId>org.apache.shardingsphere</groupId>
3838
<artifactId>sharding-orchestration-reg-nacos</artifactId>
@@ -42,6 +42,7 @@
4242
<groupId>com.alibaba.nacos</groupId>
4343
<artifactId>nacos-client</artifactId>
4444
</dependency>
45+
<!-- ShardingSphere 注册配置中心 end -->
4546

4647
<dependency>
4748
<groupId>org.mybatis.spring.boot</groupId>

sharding-sphere/src/main/java/org/ylc/note/shardingsphere/config/LocalRegistryCenter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
* 代码千万行,注释第一行,
1414
* 注释不规范,同事泪两行。
1515
* <p>
16-
* 本地注册中心
16+
* 本地注册中心(作废)
1717
*
1818
* @author YuLc
1919
* @version 1.0.0
2020
* @date 2020/7/26
2121
*/
22+
@Deprecated
2223
public class LocalRegistryCenter implements RegistryCenter {
2324

2425
public static Map<String, DataChangedEventListener> LISTENERS = new ConcurrentHashMap<>();

sharding-sphere/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ spring:
3535
# 分表策略
3636
tables:
3737
sys_log:
38-
# 真实的数据节点,数据源+表名的形式
38+
# 真实的数据节点,数据源+表名的形式(临时数据,这里需要通过配置中心来实现动态配置)
3939
actual-data-nodes: sharding$->{0..1}.sys_log_20200$->{7..9}
4040
table-strategy:
4141
standard:

0 commit comments

Comments
 (0)