pengxianggui commented on issue #22962: URL: https://github.com/apache/shardingsphere/issues/22962#issuecomment-1369417490
> You may refer to: 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} username: ${spring.datasource.username} password: ${spring.datasource.password} ``` How these variables are overridden by environment variables is a big problem. How could I override such as `${spring.datasource.host}`? -- 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]
