276234199 opened a new issue #2681: READ-WRITE SPLIT NOT WORKING in 
SHARDINGJDBC 
URL: https://github.com/apache/incubator-shardingsphere/issues/2681
 
 
   server:
     port: 12601
     tomcat:
       max-threads: 1000
       max-http-header-size : 8192
       accesslog:
         enabled: false
        
   spring:
       application :
           name :  DEMO-SHARDING-SERVICE
       security:
           user:
             name: zhouhai
             password: zhouhai    
       main:
         allow-bean-definition-overriding: true      
       shardingsphere:
         props:
           sql:
             show: true
         sharding:
           tables:
             test_sharding:
               actual-data-nodes: ds$->{0..1}.test_sharding
   #            key-generator: 
   #              column: id
   #              type: SNOWFLAKE
               table-strategy:
                 inline:
                   sharding-column: id
                   algorithm-expression: test_sharding
   #                algorithm-expression: test_sharding$->{id % 2}  
   #        binding-tables: test_sharding
           default-database-strategy: 
             inline: 
               sharding-column: id
               algorithm-expression: master$->{id % 2} 
           master-slave-rules: 
             ds1:
               master-data-source-name: master1
               slave-data-source-names: slave1
               load-balance-algorithm-type: round_robin
             ds0:
               master-data-source-name: master0
               slave-data-source-names: slave0
               load-balance-algorithm-type: round_robin
         datasource:
           names: master1,slave1,master0,slave0
           master1: 
             name: master1
             url: 
jdbc:mysql://localhost:30001/TestReadWrite?useSSL=false&serverTimezone=GMT%2B8
             username: root
             password: 123456
             #
             type: com.alibaba.druid.pool.DruidDataSource
             driver-class-name: com.mysql.jdbc.Driver
           master0: 
             name: master0
             url: 
jdbc:mysql://localhost:30003/TestReadWrite?useSSL=false&serverTimezone=GMT%2B8
             username: root
             password: 123456
             #
             type: com.alibaba.druid.pool.DruidDataSource
             driver-class-name: com.mysql.jdbc.Driver          
           slave1:
             name: slave1
             url: 
jdbc:mysql://localhost:30002/TestReadWrite?useSSL=false&serverTimezone=GMT%2B8
             username: root
             password: 123456
             #
             type: com.alibaba.druid.pool.DruidDataSource
             driver-class-name: com.mysql.jdbc.Driver     
           slave0:
             name: slave0
             url: 
jdbc:mysql://localhost:30004/TestReadWrite?useSSL=false&serverTimezone=GMT%2B8
             username: root
             password: 123456
             #
             type: com.alibaba.druid.pool.DruidDataSource
             driver-class-name: com.mysql.jdbc.Driver        
       servlet :             
           multipart :                           # file upload
                maxFileSize  :  5MB
                maxRequestSize : 5MB        
   
   
    
   eureka:
     client:
       register-with-eureka: true
       service-url:
         defaultZone: 
http://zhouhai:zhouhai@localhost:12571/eureka/,http://zhouhai:zhouhai@localhost:12572/eureka/
     instance:
       instance-id: DEMO-SHARDING-SERVICE12601
       prefer-ip-address: true       
   
           
   #mybatis plus 设置
   mybatis-plus:
     type-aliases-package: com.chengyun.entity.po
     mapper-locations: classpath:mappers/*.xml
     configuration:
       jdbc-type-for-null: null
     global-config:
       # 关闭 mybatis-plus的 banner
       banner: false
   #与xml二选一  
   #  configuration:
   #     logImpl : org.apache.ibatis.logging.stdout.StdOutImpl
   
   
---------------------------------------------------------------------------------------------------
   application.yml is shown above  
   
   sharding is available but 
   READ-WRITE SPLIT NOT WORKING
   
   
   version : 4.0.0-RC1
   

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


With regards,
Apache Git Services

Reply via email to