jeecg-sharding.yaml 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. spring:
  2. shardingsphere:
  3. datasource:
  4. names: ds0
  5. ds0:
  6. driverClassName: com.mysql.cj.jdbc.Driver
  7. url: jdbc:mysql://jeecg-boot-mysql:3306/jeecg-boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
  8. username: root
  9. password: root
  10. type: com.alibaba.druid.pool.DruidDataSource
  11. props:
  12. sql-show: true
  13. rules:
  14. sharding:
  15. binding-tables: sys_log
  16. key-generators:
  17. snowflake:
  18. type: SNOWFLAKE
  19. props:
  20. worker-id: 123
  21. sharding-algorithms:
  22. table-classbased:
  23. props:
  24. strategy: standard
  25. algorithmClassName: org.jeecg.modules.test.sharding.algorithm.StandardModTableShardAlgorithm
  26. type: CLASS_BASED
  27. tables:
  28. sys_log:
  29. actual-data-nodes: ds0.sys_log$->{0..1}
  30. table-strategy:
  31. standard:
  32. sharding-algorithm-name: table-classbased
  33. sharding-column: log_type