shardingsphere
shardingsphere copied to clipboard
Missing the data source name: 'ds0.5'
Question
Error updating database. Cause: java.lang.IllegalStateException: Missing the data source name: 'ds0.5'
The error may involve com.paas.demo.dao.UserInfoMapper.insert-Inline
The error occurred while setting parameters
SQL: insert into user_info (user_id, user_name, account, password) values (?, ?, ?, ?)
Cause: java.lang.IllegalStateException: Missing the data source name: 'ds0.5'] with root cause
rules:sharding.jdbc.config.sharding.tables.user_info.database-strategy.inline.algorithm-expression=ds$->{user_id % 4 / 2}
config issue, please try to understand config rule, make sure sharding algorithm result can match data source name