Skip to content

Commit 62a8bc4

Browse files
committed
fix(init): 修复SQL配置的Initializer未被调用的问题。
1 parent 40afd98 commit 62a8bc4

File tree

9 files changed

+18
-13
lines changed

9 files changed

+18
-13
lines changed

api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>minesql-parent</artifactId>
77
<groupId>cc.carm.plugin</groupId>
8-
<version>1.4.0</version>
8+
<version>1.4.1</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>minesql-parent</artifactId>
77
<groupId>cc.carm.plugin</groupId>
8-
<version>1.4.0</version>
8+
<version>1.4.1</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<properties>

core/src/main/java/cc/carm/plugin/minesql/MineSQLCore.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public static MineSQLCore getInstance() {
124124
}
125125

126126
@Override
127-
public @NotNull SQLManagerImpl create(@NotNull String name, @NotNull SQLSourceConfig conf) {
127+
public @NotNull SQLManagerImpl create(@NotNull String name, @NotNull SQLSourceConfig conf) throws Exception {
128128
BeeDataSourceConfig config = new BeeDataSourceConfig();
129129
config.setDriverClassName(conf.getDriverClassName());
130130
config.setJdbcUrl(conf.getJdbcURL());
@@ -147,7 +147,12 @@ public static MineSQLCore getInstance() {
147147
Optional.ofNullable(conf.getSettings().getValidationTimeout()).ifPresent(config::setValidTestTimeout);
148148
Optional.ofNullable(conf.getSettings().getValidationInterval()).ifPresent(config::setValidAssumeTime);
149149

150-
return create(name, config);
150+
SQLManagerImpl manager = create(name, config);
151+
if (conf.getInitializer() != null) {
152+
conf.getInitializer().accept(manager);
153+
}
154+
155+
return manager;
151156
}
152157

153158
@Override

platforms/bukkit/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>minesql-parent</artifactId>
77
<groupId>cc.carm.plugin</groupId>
8-
<version>1.4.0</version>
8+
<version>1.4.1</version>
99
<relativePath>../../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>

platforms/bungee/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>minesql-parent</artifactId>
77
<groupId>cc.carm.plugin</groupId>
8-
<version>1.4.0</version>
8+
<version>1.4.1</version>
99
<relativePath>../../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>

platforms/sponge8/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>minesql-parent</artifactId>
77
<groupId>cc.carm.plugin</groupId>
8-
<version>1.4.0</version>
8+
<version>1.4.1</version>
99
<relativePath>../../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>

platforms/velocity/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>minesql-parent</artifactId>
77
<groupId>cc.carm.plugin</groupId>
8-
<version>1.4.0</version>
8+
<version>1.4.1</version>
99
<relativePath>../../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>

plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>minesql-parent</artifactId>
77
<groupId>cc.carm.plugin</groupId>
8-
<version>1.4.0</version>
8+
<version>1.4.1</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<properties>

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
1313

1414
<deps.easysql.version>0.4.7</deps.easysql.version>
15-
<deps.easyconf.version>3.3.1</deps.easyconf.version>
16-
<deps.easyplugin.version>1.4.18</deps.easyplugin.version>
15+
<deps.easyconf.version>3.5.1</deps.easyconf.version>
16+
<deps.easyplugin.version>1.5.5</deps.easyplugin.version>
1717
<deps.beecp.version>3.3.9</deps.beecp.version>
1818

1919
<deps.libby.version>1.1.5</deps.libby.version>
@@ -30,7 +30,7 @@
3030
<groupId>cc.carm.plugin</groupId>
3131
<artifactId>minesql-parent</artifactId>
3232
<packaging>pom</packaging>
33-
<version>1.4.0</version>
33+
<version>1.4.1</version>
3434
<modules>
3535
<module>api</module>
3636
<module>core</module>
@@ -128,7 +128,7 @@
128128
<dependency>
129129
<groupId>org.jetbrains</groupId>
130130
<artifactId>annotations</artifactId>
131-
<version>23.1.0</version>
131+
<version>24.0.1</version>
132132
<scope>provided</scope>
133133
</dependency>
134134

0 commit comments

Comments
 (0)