|
|
发表于 2020-12-6 11:53:33
|
显示全部楼层
redis一直没开起来,查看连接一直没有到redis的
- server:
- port: 80
- spring:
- datasource:
- url: jdbc:mysql://10.10.10.100:3306/book?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
- username: book
- password: bookpasswd
- driver-class-name: com.mysql.cj.jdbc.Driver
- redis:
- host: 10.10.10.101
- port: 6379
- jedis:
- pool:
- max-active: -1
- max-wait: 8
- max-idle: 8
- min-idle: 0
- timeout: 30000
- sharding:
- jdbc:
- datasource:
- names: ds0
- ds0:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://10.10.10.100:3306/book?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
- username: book
- password: bookpasswd
- config:
- sharding:
- props:
- sql.show: true
- tables:
- book_content:
- key-generator-column-name: id
- actual-data-nodes: ds${0}.book_content${0..9}
- table-strategy:
- inline:
- shardingColumn: index_id
- algorithm-expression: book_content${index_id % 10}
- cache:
- type: redis
- pic:
- save:
- type: 1
- path: /var/pic
复制代码 |
|