mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
feat: print h2 database version
This commit is contained in:
parent
33539857f4
commit
75e5c7049f
@ -1,6 +1,7 @@
|
|||||||
package tech.powerjob.worker.persistence;
|
package tech.powerjob.worker.persistence;
|
||||||
|
|
||||||
import tech.powerjob.common.utils.CommonUtils;
|
import tech.powerjob.common.utils.CommonUtils;
|
||||||
|
import tech.powerjob.common.utils.JavaUtils;
|
||||||
import tech.powerjob.worker.common.constants.StoreStrategy;
|
import tech.powerjob.worker.common.constants.StoreStrategy;
|
||||||
import com.zaxxer.hikari.HikariConfig;
|
import com.zaxxer.hikari.HikariConfig;
|
||||||
import com.zaxxer.hikari.HikariDataSource;
|
import com.zaxxer.hikari.HikariDataSource;
|
||||||
@ -33,6 +34,10 @@ public class ConnectionFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void initDatasource(StoreStrategy strategy) {
|
public synchronized void initDatasource(StoreStrategy strategy) {
|
||||||
|
|
||||||
|
// H2 兼容性问题较多,前置输出版本方便排查
|
||||||
|
log.info("[PowerDatasource] H2 database version: {}", JavaUtils.determinePackageVersion(Driver.class));
|
||||||
|
|
||||||
// 兼容单元测试,否则没办法单独测试 DAO 层了
|
// 兼容单元测试,否则没办法单独测试 DAO 层了
|
||||||
strategy = strategy == null ? StoreStrategy.DISK : strategy;
|
strategy = strategy == null ? StoreStrategy.DISK : strategy;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user