1
mirror of https://github.com/CarmJos/MineSQL.git synced 2024-09-19 12:15:45 +00:00

fix(init): 修复SQL配置的Initializer未被调用的问题。

This commit is contained in:
Carm Jos 2023-04-17 00:49:46 +08:00
parent 40afd988e4
commit 62a8bc4629
9 changed files with 18 additions and 13 deletions

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>minesql-parent</artifactId>
<groupId>cc.carm.plugin</groupId>
<version>1.4.0</version>
<version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>minesql-parent</artifactId>
<groupId>cc.carm.plugin</groupId>
<version>1.4.0</version>
<version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<properties>

View File

@ -124,7 +124,7 @@ public class MineSQLCore implements IMineSQL {
}
@Override
public @NotNull SQLManagerImpl create(@NotNull String name, @NotNull SQLSourceConfig conf) {
public @NotNull SQLManagerImpl create(@NotNull String name, @NotNull SQLSourceConfig conf) throws Exception {
BeeDataSourceConfig config = new BeeDataSourceConfig();
config.setDriverClassName(conf.getDriverClassName());
config.setJdbcUrl(conf.getJdbcURL());
@ -147,7 +147,12 @@ public class MineSQLCore implements IMineSQL {
Optional.ofNullable(conf.getSettings().getValidationTimeout()).ifPresent(config::setValidTestTimeout);
Optional.ofNullable(conf.getSettings().getValidationInterval()).ifPresent(config::setValidAssumeTime);
return create(name, config);
SQLManagerImpl manager = create(name, config);
if (conf.getInitializer() != null) {
conf.getInitializer().accept(manager);
}
return manager;
}
@Override

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>minesql-parent</artifactId>
<groupId>cc.carm.plugin</groupId>
<version>1.4.0</version>
<version>1.4.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>minesql-parent</artifactId>
<groupId>cc.carm.plugin</groupId>
<version>1.4.0</version>
<version>1.4.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>minesql-parent</artifactId>
<groupId>cc.carm.plugin</groupId>
<version>1.4.0</version>
<version>1.4.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>minesql-parent</artifactId>
<groupId>cc.carm.plugin</groupId>
<version>1.4.0</version>
<version>1.4.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>minesql-parent</artifactId>
<groupId>cc.carm.plugin</groupId>
<version>1.4.0</version>
<version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<properties>

View File

@ -12,8 +12,8 @@
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
<deps.easysql.version>0.4.7</deps.easysql.version>
<deps.easyconf.version>3.3.1</deps.easyconf.version>
<deps.easyplugin.version>1.4.18</deps.easyplugin.version>
<deps.easyconf.version>3.5.1</deps.easyconf.version>
<deps.easyplugin.version>1.5.5</deps.easyplugin.version>
<deps.beecp.version>3.3.9</deps.beecp.version>
<deps.libby.version>1.1.5</deps.libby.version>
@ -30,7 +30,7 @@
<groupId>cc.carm.plugin</groupId>
<artifactId>minesql-parent</artifactId>
<packaging>pom</packaging>
<version>1.4.0</version>
<version>1.4.1</version>
<modules>
<module>api</module>
<module>core</module>
@ -128,7 +128,7 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>23.1.0</version>
<version>24.0.1</version>
<scope>provided</scope>
</dependency>