diff --git a/pom.xml b/pom.xml index 5d701f2..f493121 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 @@ -16,7 +17,7 @@ bootstrap Spring Boot Project BootStrap - + 17 1.9.23 @@ -42,7 +43,25 @@ - + + + org.apache.maven.plugins + maven-assembly-plugin + + + make-assembly + package + + single + + + + + + src/main/resources/assembly/assembly.xml + + + + - diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 4bbe3ff..66e19fc 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -4,7 +4,7 @@ server.port=8080 mybatis.mapper-locations=classpath*:mapper/**/*Mapper.xml -spring.datasource.url=jdbc:h2:file:~/.h2/app +spring.datasource.url=jdbc:h2:file:../data/app spring.datasource.username=root spring.datasource.password=root spring.datasource.driver-class-name=org.h2.Driver diff --git a/src/main/resources/assembly/assembly.xml b/src/main/resources/assembly/assembly.xml new file mode 100644 index 0000000..ff9248a --- /dev/null +++ b/src/main/resources/assembly/assembly.xml @@ -0,0 +1,64 @@ + + + + RELEASE + + + zip + + + false + + + + true + lib + runtime + + + + + + src/main/resources + conf + + *.properties + + 0755 + + + src/main/resources/script + bin + + *.sh + *.bat + + 0755 + + + /data + + **/* + + 0755 + + + /log + + **/* + + 0755 + + + /temp + + **/* + + 0755 + + + + \ No newline at end of file diff --git a/src/main/resources/script/start.bat b/src/main/resources/script/start.bat new file mode 100644 index 0000000..3d08291 --- /dev/null +++ b/src/main/resources/script/start.bat @@ -0,0 +1 @@ +java -Dfile.encoding=utf-8 -classpath "../lib/*" space.caoshd.BootstrapApplication \ No newline at end of file diff --git a/src/main/resources/script/start.sh b/src/main/resources/script/start.sh new file mode 100644 index 0000000..3d08291 --- /dev/null +++ b/src/main/resources/script/start.sh @@ -0,0 +1 @@ +java -Dfile.encoding=utf-8 -classpath "../lib/*" space.caoshd.BootstrapApplication \ No newline at end of file