yu199195 opened a new pull request #5709:
URL: https://github.com/apache/shardingsphere/pull/5709


   this pr can optimize user configuration of datasource. Typically configured 
datasource has a lot of duplicate properties
   old :
   ```yaml
   
spring.shardingsphere.datasource.ds.type=org.apache.commons.dbcp2.BasicDataSource
   spring.shardingsphere.datasource.ds.driver-class-name=org.h2.Driver
   
spring.shardingsphere.datasource.ds.url=jdbc:h2:mem:ds;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
   spring.shardingsphere.datasource.ds.username=sa
   spring.shardingsphere.datasource.ds.password=
   
   
spring.shardingsphere.datasource.ds_0.type=org.apache.commons.dbcp2.BasicDataSource
   spring.shardingsphere.datasource.ds_0.driver-class-name=org.h2.Driver
   
spring.shardingsphere.datasource.ds_0.url=jdbc:h2:mem:ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
   spring.shardingsphere.datasource.ds_0.username=sa
   spring.shardingsphere.datasource.ds_0.password=
   ```
   
   now : 
   ```yaml
   
spring.shardingsphere.datasource.common.type=org.apache.commons.dbcp2.BasicDataSource
   spring.shardingsphere.datasource.common.driver-class-name=org.h2.Driver
   spring.shardingsphere.datasource.common.username=sa
   spring.shardingsphere.datasource.common.password=
   
   
spring.shardingsphere.datasource.ds.url=jdbc:h2:mem:ds;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
   
spring.shardingsphere.datasource.ds_0.url=jdbc:h2:mem:ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_U
   ```
   Of course, you can also customize to override common properties.
   


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to