opened 10:23AM - 19 Jan 24 UTC
shardingjdbc 5.4.1
pom.xml
```xml
<dependency>
<groupI…d>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core</artifactId>
<version>5.4.1</version>
<exclusions>
<exclusion>
<artifactId>snakeyaml</artifactId>
<groupId>org.yaml</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.33</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.3.2.RELEASE</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<artifactId>snakeyaml</artifactId>
<groupId>org.yaml</groupId>
</exclusion>
</exclusions>
</dependency>
```
The following two pictures `HINT` have different local configuration methods. When I use the method of picture 1 to configure, an error will be reported. (下面这两个图片 `HINT` 地方配置方式不一致,当我使用图片1的方式进行配置,会报错)


sharding.yaml

error msg: (报错信息)

And it will flush logs crazily, causing the CPU to increase and the fan to spin wildly.(并且会疯狂刷日志,导致CPU升高,风扇狂转)
---------------------------
When I use the other configuration in Picture 2, no error will be reported, but it will not enter my custom algorithm. If I specify two data sources, it will query two data sources, and if it is three, it will query three data sources.
(当我使用图片2的另一种方式配置,不会报错,但是不会进入我的自定义算法中,指定两个数据源,他就查询两个数据源,三个就查询三个数据源)

查询

Custom algorithm

question:
1. How should I configure the forced routing using hint? I want to implement the SAS architecture and multi-tenant function. By specifying the hint algorithm, I can obtain the corresponding user's library during execution, and the hint forcefully specifies the data source function.
(问题:
1、我到底应该怎样配置使用hint 强制路由,我是为了实现sas架构,多租户功能,通过指定hint算法,执行时获取对应用户所属库,hint强制指定数据源功能)
非常感谢!