Skip to content

Commit

Permalink
feat: h2.web
Browse files Browse the repository at this point in the history
  • Loading branch information
cssxsh committed Sep 13, 2023
1 parent 195ad7d commit 86cdeae
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion example/h2.hibernate.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
hibernate.connection.url=jdbc:h2:file:./data/xyz.cssxsh.mirai.plugin.mirai-hibernate-plugin/record.h2
hibernate.connection.url=jdbc:h2:file:./data/xyz.cssxsh.mirai.plugin.mirai-hibernate-plugin/record.h2;AUTO_SERVER=TRUE
hibernate.connection.provider_class=org.hibernate.hikaricp.internal.HikariCPConnectionProvider
hibernate.connection.isolation=1
hibernate.hbm2ddl.auto=update
Expand Down
22 changes: 22 additions & 0 deletions example/h2.web.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@echo off
setlocal
set JAVA_BINARY="java"
if exist "java" set JAVA_BINARY=".\java\bin\java.exe"
if exist "java-home" set JAVA_BINARY=".\java-home\bin\java.exe"
if exist "jdk-17.0.7+7" set JAVA_BINARY=".\jdk-17.0.7+7\bin\java.exe"
if exist "jdk-17.0.7+7-jre" set JAVA_BINARY=".\jdk-17.0.7+7-jre\bin\java.exe"
if exist "jdk-17.0.8+7" set JAVA_BINARY=".\jdk-17.0.8+7\bin\java.exe"
if exist "jdk-17.0.8+7-jre" set JAVA_BINARY=".\jdk-17.0.8+7-jre\bin\java.exe"

set H2_JAR="h2-2.2.222.jar"
if exist ".\plugin-libraries\com\h2database\h2\2.1.222\h2-2.2.222.jar" set JAVA_BINARY=".\plugin-libraries\com\h2database\h2\2.1.222\h2-2.2.222.jar"
if exist ".\plugin-libraries\com\h2database\h2\2.1.214\h2-2.1.214.jar" set JAVA_BINARY=".\plugin-libraries\com\h2database\h2\2.1.214\h2-2.1.214.jar"

%JAVA_BINARY% -version
%JAVA_BINARY% -jar %H2_JAR% -url jdbc:h2:./data/xyz.cssxsh.mirai.plugin.mirai-hibernate-plugin/hibernate.h2;AUTO_SERVER=TRUE %*

set EL=%ERRORLEVEL%
if %EL% NEQ 0 (
echo Process exited with %EL%
pause
)

0 comments on commit 86cdeae

Please sign in to comment.