You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/01/03 06:38:43 UTC

[GitHub] [shardingsphere] NOLouser commented on issue #14375: shardingsphere-jdbc.5.0.0:IllegalArgumentException: Class is not accepted: com.alibaba.druid.pool.DruidDataSource

NOLouser commented on issue #14375:
URL: https://github.com/apache/shardingsphere/issues/14375#issuecomment-1003895708


   @eschh19 
   Hi, If you use YamlShardingSphereDataSourceFactory to create dataSource, you can refer to this configuration (Or take a look at my demo: [https://github.com/NOLouser/shardingsphere5.0.0_demo/blob/master/src/main/resources/shardingsphere.yml](https://github.com/NOLouser/shardingsphere5.0.0_demo/blob/master/src/main/resources/shardingsphere.yml) ):
   ```
   # 配置真实数据源
   dataSources:
     # 配置第 1 个数据源
     ds:
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       driverClassName: com.mysql.cj.jdbc.Driver
       jdbcUrl: jdbc:mysql://localhost:3306/month_ds?useUnicode=true&characterEncoding=utf-8&useSSL=false
       username: root
       password: 123456
   ```
   
   And If you use springboot application.yml, please refer to @zjcnb example.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org