You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/10/06 11:09:39 UTC
[GitHub] [skywalking] wu-sheng commented on a change in pull request #3564:
Instead of datasource-settings.properties,
use application.yml for MySQLStorageProvider
wu-sheng commented on a change in pull request #3564: Instead of datasource-settings.properties, use application.yml for MySQLStorageProvider
URL: https://github.com/apache/skywalking/pull/3564#discussion_r331783270
##########
File path: oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/mysql/MySQLStorageProvider.java
##########
@@ -66,15 +96,8 @@ public MySQLStorageProvider() {
return config;
}
- @Override public void prepare() throws ServiceNotProvidedException, ModuleStartException {
- Properties settings = new Properties();
- try {
- settings.load(ResourceUtils.read("datasource-settings.properties"));
- } catch (IOException e) {
- throw new ModuleStartException("load datasource setting file failure.", e);
- }
-
- mysqlClient = new JDBCHikariCPClient(settings);
+ @Override public void prepare() throws ServiceNotProvidedException {
+ mysqlClient = new JDBCHikariCPClient(getConfigProperties());
Review comment:
I have replied, basically, agree with @kezhenxuke.
@tristaZero If you want a properties field, read my suggestion.
----------------------------------------------------------------
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
With regards,
Apache Git Services