Compare commits

..

2 Commits

Author SHA1 Message Date
tomsun28
5e9c00934e Update README.md 2022-03-19 04:44:41 +00:00
xgf
73d743a078 [manager]feature readme.rd 添加默认账号密码 提示 2022-03-19 11:20:53 +08:00
2 changed files with 1 additions and 33 deletions

View File

@@ -1,31 +0,0 @@
package com.usthe.collector.collect.database;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Service;
/**
* 预加载jdbc驱动包 避免spi并发加载造成死锁
* @author tom
* @date 2022/3/19 15:39
*/
@Service
@Slf4j
@Order(value = 0)
public class JdbcSpiLoader implements CommandLineRunner {
@Override
public void run(String... args) throws Exception {
log.info("start load jdbc drivers");
try {
Class.forName("com.mysql.cj.jdbc.Driver");
Class.forName("org.postgresql.Driver");
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
} catch (Exception e) {
log.error("load jdbc error: {}", e.getMessage(), e);
}
log.info("end load jdbc drivers");
}
}

View File

@@ -6,5 +6,4 @@ com.usthe.collector.dispatch.MetricsCollectorQueue,\
com.usthe.collector.dispatch.WorkerPool,\
com.usthe.collector.dispatch.entrance.internal.CollectJobService,\
com.usthe.collector.dispatch.export.MetricsDataExporter,\
com.usthe.collector.util.SpringContextHolder,\
com.usthe.collector.collect.database.JdbcSpiLoader
com.usthe.collector.util.SpringContextHolder