File tree 4 files changed +24
-4
lines changed
src/main/kotlin/xyz/cssxsh/mirai/hibernate
4 files changed +24
-4
lines changed Original file line number Diff line number Diff line change
1
+ ## 2.9.0 (24/09/11)
2
+
3
+ 1 . update: h2 2.3.232
4
+ 2 . update: sqlite-jdbc 3.46.1.0
5
+ 3 . update: postgresql 42.7.4
6
+ 4 . update: mssql-jdbc 12.8.1.jre1
7
+ 5 . feat: MiraiH2
8
+
1
9
## 2.8.2 (24/08/11)
2
10
3
11
1 . update: hibernate-platform 6.6.0.Final
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ plugins {
8
8
}
9
9
10
10
group = " xyz.cssxsh.mirai"
11
- version = " 2.8.2 "
11
+ version = " 2.9.0 "
12
12
13
13
mavenCentralPublish {
14
14
useCentralS01()
Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ import org.hibernate.*
11
11
import java.sql.*
12
12
import kotlin.coroutines.*
13
13
14
+ /* *
15
+ * H2 相关操作
16
+ * @since 2.9.0
17
+ */
14
18
public object MiraiH2 : SimpleListenerHost() {
15
19
16
20
override fun handleException (context : CoroutineContext , exception : Throwable ) {
@@ -56,8 +60,10 @@ public object MiraiH2 : SimpleListenerHost() {
56
60
} catch (_: SQLException ) {
57
61
return @launch
58
62
}
59
- logger.info(message = " h2 web $url " )
60
- Server .openBrowser(url)
63
+ logger.info(message = " h2database editor $url " )
64
+ if (System .getProperty(" h2.web.browser" , " false" ).toBoolean()) {
65
+ Server .openBrowser(url)
66
+ }
61
67
}
62
68
}
63
69
}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ internal object MiraiHibernatePlugin : KotlinPlugin(
14
14
JvmPluginDescription (
15
15
id = "xyz.cssxsh.mirai.plugin.mirai-hibernate-plugin",
16
16
name = "mirai-hibernate-plugin",
17
- version = "2.8.1 "
17
+ version = "2.9.0 "
18
18
) {
19
19
author("cssxsh")
20
20
@@ -65,6 +65,12 @@ internal object MiraiHibernatePlugin : KotlinPlugin(
65
65
.renameTo(resolveDataFile(" backup.$current .h2.trace.db" ))
66
66
throw RuntimeException (" 本地文件和数据库版本不匹配,已备份,请重新启动" , exception)
67
67
}
68
+ if (" password" in exception.message.orEmpty()) {
69
+ throw RuntimeException (
70
+ " 配置错误:\n ${configuration.loader.configuration.toPath().toUri()} \" " ,
71
+ exception
72
+ )
73
+ }
68
74
throw exception
69
75
}
70
76
You can’t perform that action at this time.
0 commit comments