Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shardingsphere #7424

Open
FuFengs opened this issue Nov 4, 2024 · 1 comment
Open

shardingsphere #7424

FuFengs opened this issue Nov 4, 2024 · 1 comment

Comments

@FuFengs
Copy link

FuFengs commented Nov 4, 2024

版本号:3.5.3
问题描述:

按照 https://www.kancloud.cn/zhangdaiscott/jeecg-boot/3085227 集成单体项目分表 控制台打印日志显示集成成功 但是没有按照日志类型路由到对应的表
依赖:

org.jeecgframework.boot
jeecg-boot-starter-shardingsphere


guava
com.google.guava



因为启动时候 guava依赖报错依赖冲入所以排除了
配置:
shardingsphere:
datasource:
names: ds0
ds0:
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
props:
sql-show: true
rules:
sharding:
binding-tables: sys_log
key-generators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 123
sharding-algorithms:
table-classbased:
props:
strategy: standard
algorithmClassName: org.jeecg.sharding.SyslogShardAlgorithm
type: CLASS_BASED
tables:
sys_log:
actual-data-nodes: ds0.sys_log$->{0..1}
table-strategy:
standard:
sharding-algorithm-name: table-classbased
sharding-column: log_type

错误截图:

Snipaste_2024-11-04_11-41-27

Snipaste_2024-11-04_11-41-56

友情提示:

  • 未按格式要求发帖、描述过于简单的,会被直接删掉;
  • 描述问题请图文并茂,方便我们理解并快速定位问题;
  • 如果使用的不是master,请说明你使用的分支;
@zhangdaiscott
Copy link
Member

zj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants