pengxianggui opened a new issue, #23283:
URL: https://github.com/apache/shardingsphere/issues/23283

   > The official way to do it is: 
https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/
   
   This way of integrating springboot makes it difficult to overwrite 
environment variables. 
   For example:
   ```
   spring:
     datasource:
       url: jdbc:shardingsphere:classpath:application-sharding.yml
       driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver
   ```
   application-sharding.yml:
   ```
   dataSources:
     db0: # 单数据库节点无意义,当存在多个时用于区分
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource # 数据库连接池全类名
       driverClassName: com.mysql.cj.jdbc.Driver
       jdbcUrl: 
jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/${spring.datasource.schema-name:asoco_alarm_platform}?${spring.datasource.suffix}
 # 拼接的连接url, 无需变动
       username: ${spring.datasource.username}
       password: ${spring.datasource.password}
   ```
   How these variables are overridden by environment variables is a problem. 


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