StupidManYI commented on issue #18192:
URL: 
https://github.com/apache/shardingsphere/issues/18192#issuecomment-1147159698

   when I add more druid  configuration  , the application will  report an 
error  (  
'org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration': 
Initialization of bean failed; nested exception is 
java.lang.IllegalArgumentException: argument type mismatch
     at
   )
   
           #the more druid configuration
   
           minIdle: 2
           # 初始化连接数
           initialSize: 1
           # 最大连接数
           maxTotal: 5
           maxWaitMillis: 200s
           connectionInitSqls: SET NAMES utf8mb4  #让 druid 支持特殊字符x
   
   
   **my yaml config**
   
   
   
             spring:
               shardingsphere:
                 datasource:
                   #数据库名称(可以与数据库中的库名不一致)
                   names: ds0
                   ds0:
                     type: com.alibaba.druid.pool.DruidDataSource
                     driverClassName: com.mysql.cj.jdbc.Driver
                     url: 
jdbc:mysql://xxxx:8888/echao_basic1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&useTimezone=true&tinyInt1isBit=false
                     username: root
                     password: "123456"
                     # 数据库连接池的最小连接数
                     #        minIdle: 2
                     #        # 初始化连接数
                     #        initialSize: 1
                     #        # 最大连接数
                     #        maxTotal: 5
                     #            maxWaitMillis: 200s
                     #        connectionInitSqls: SET NAMES utf8mb4  #让 druid 
支持特殊字符
                 rules:
                   defaultDatabaseStrategy:
                     inline:
                       sharding-column: id
                       algorithm-expression: ds0
                     defaultKeyGenerateStrategy:
                       type: MyShardingKeyGenerator
                       column: id
             `


-- 
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]

Reply via email to