726411951 commented on issue #10086:
URL:
https://github.com/apache/shardingsphere/issues/10086#issuecomment-820885230
> You can consider using the `default-table-strategy` and
`default-database-strategy`.
hi, @tristaZero ,I tried to use the `default-database-strategy` like
spring.shardingsphere.sharding.default-database-strategy.standard.sharding-column=sharding_code
spring.shardingsphere.sharding.default-database-strategy.standard.precise-algorithm-class-name=com.xx.ShardingAlgorithmConfig
and my test SQL statements for select ,insert
` select id, `name`, sharding from t_order where sharding_code= ?`
`insert into t_order(id, `name`, sharding_code) values
(#{?,jdbcType=INTEGER}, #{?,jdbcType=VARCHAR}{?,jdbcType=VARCHAR} )`
but it seems like this config is invalid when the project run, the result is
it access random datebase and dont use the
precise-algorithm`ShardingAlgorithmConfig` class .
when config like

it can access valid datebase
so ,what's the matter
and the version is 4.1.1
thanks
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]