Juan Pan <[email protected]>于2019年9月30日 周一下午6:44写道:
> Hi everyone, > > > If all properties in the `datasource-settings.properties` are moved into > `application.yml`, any property for database could be changed through > system env. All properties in the yml support the system env config. You could read the codes, or refer the name by brace in value segment. > > > > How to do that? > Given skyWalking use `HikariCP` for JDBC connection, my initial idea is to > put all the configurations for `HikariCP` to `MySQLStorageConfig` extending > ModuleConfig. > > > Is it worth doing this improvement? Or any one has some better ideas? Options are 1. Move those to config 2. Use JSON or other formats You could choose based on your thoughts. Sheng > > > Thanks, > Trista > > > Juan Pan > > > [email protected] > Juan Pan(Trista), Apache ShardingSphere > > > On 09/28/2019 21:41,Juan Pan<[email protected]> wrote: > Thanks for your rely. I will consider about your `better things`. (^_^) > > > > > Juan Pan > > > [email protected] > Juan Pan(Trista), Apache ShardingSphere > On 09/27/2019 19:20, 吴晟 Sheng Wu wrote: > datasource-settings.properties file is loaded by codes, through file name > only. > > > But the better things for application.yml are two > 1. It could be overrided by system env, which is much more friendly than > config file change. > 2. In our container definition, application yaml file could be change > through system env, not just values of config items, but including provider > names. You could read skywalking-docker about this. > > > This file should be merged into application.yaml, and it is open to > change. Please submit pull request if you want. > > > > > Sheng Wu > Apache SkyWalking, ShardingSphere, Zipkin > > From Wu Sheng 's phone. > > > > ------------------ Original ------------------ > From: Juan Pan <[email protected]> > Date: Fri,Sep 27,2019 7:14 PM > To: dev <[email protected]> > Subject: Re: Why is `datasource-settings.properties` necessary when > storage is `MySQL` > > > > > > Hi everyone, > > > I am exploring SkyWalking, and i find when storage is`MySQL, > `datasource-settings.properties` is needed to set properties, while > all the properties of H2 storage can be set through `application.yml`. > > > Why is `datasource-settings.properties` necessary for MySQL storage? Do > they have different loading mechanism? > > > Thanks for your help. :) > > > Regards, > Trista > > > Juan Pan > > > [email protected] > Juan Pan(Trista), Apache ShardingSphere -- Sheng Wu SkyWalking, Shardingsphere and Zipkin
