qiuweilu commented on issue #27494:
URL:
https://github.com/apache/shardingsphere/issues/27494#issuecomment-1652842604
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core</artifactId>
<version>5.4.0</version>
</dependency>
**springboot 2.7
@Scheduled(cron = "0 */2 * * * ?", zone = "Asia/Shanghai")
Error querying database. Cause: java.sql.SQLException: Table 'user_order'
doesn't exist
user_ order is a single table without sharding**
mode:
type: Standalone
repository:
type: JDBC
dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
jdbcUrl:
jdbc:mysql://localhost:3306/foxwish?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=GMT%2B8
username: root
password: 123456
rules:
- !SHARDING
tables:
user_media:
actualDataNodes: ds_0.user_media_${0..9}
tableStrategy:
standard:
shardingColumn: part_fkid
shardingAlgorithmName: t_media_inline
part_cmnt:
actualDataNodes: ds_0.part_cmnt_${0..9}
tableStrategy:
standard:
shardingColumn: part_fkid
shardingAlgorithmName: t_cmnt_inline
part_vote:
actualDataNodes: ds_0.part_vote_${0..9}
tableStrategy:
standard:
shardingColumn: part_fkid
shardingAlgorithmName: t_vote_inline
part_apply:
actualDataNodes: ds_0.part_apply_${0..9}
tableStrategy:
standard:
shardingColumn: part_fkid
shardingAlgorithmName: t_apply_inline
act_stats:
actualDataNodes: ds_0.act_stats_${0..9}
tableStrategy:
standard:
shardingColumn: part_fkid
shardingAlgorithmName: t_stats_inline
user_earn:
actualDataNodes: ds_0.user_earn_${0..9}
tableStrategy:
standard:
shardingColumn: part_fkid
shardingAlgorithmName: t_earn_inline
shardingAlgorithms:
t_media_inline:
type: INLINE
props:
algorithm-expression: user_media_${part_fkid % 10}
t_cmnt_inline:
type: INLINE
props:
algorithm-expression: part_cmnt_${part_fkid % 10}
t_vote_inline:
type: INLINE
props:
algorithm-expression: part_vote_${part_fkid % 10}
t_apply_inline:
type: INLINE
props:
algorithm-expression: part_apply_${part_fkid % 10}
t_stats_inline:
type: INLINE
props:
algorithm-expression: act_stats_${part_fkid % 10}
t_earn_inline:
type: INLINE
props:
algorithm-expression: user_earn_${part_fkid % 10}
props:
sql-show: true
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]