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 2020/05/20 11:01:43 UTC

[GitHub] [shardingsphere] yu199195 opened a new pull request #5709: Optimize user configuration of datasource.

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



[GitHub] [shardingsphere] terrymanu merged pull request #5709: Optimize user configuration of datasource.

Posted by GitBox <gi...@apache.org>.
terrymanu merged pull request #5709:
URL: https://github.com/apache/shardingsphere/pull/5709


   


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