diff --git a/example/h2.hibernate.properties b/example/h2.hibernate.properties index 470d5ec..50b71b7 100644 --- a/example/h2.hibernate.properties +++ b/example/h2.hibernate.properties @@ -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 diff --git a/example/h2.web.cmd b/example/h2.web.cmd new file mode 100644 index 0000000..362af25 --- /dev/null +++ b/example/h2.web.cmd @@ -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 +) \ No newline at end of file