# JAR发布
后端打包.jar运行,前端build后部署到nginx或其他托管服务器
# 后端
- 修改配置
application.properties
修改数据库连接
%prod.quarkus.datasource.username=quarkus-vue-admin
%prod.quarkus.datasource.password=1e4Df2Hg8d
%prod.quarkus.datasource.jdbc.url=jdbc:mysql://localhost:3306/quarkus-vue-admin
1
2
3
2
3
修改本地上传路径
%prod.oss.store-path=/home/quarkus-vue-admin/
1
- 执行maven打包命令
./mvnw package -Dmaven.test.skip=true
1
It produces the quarkus-run.jar
file in the target/quarkus-app/
directory. Be aware that it’s not an über-jar as
the dependencies are copied into the target/quarkus-app/lib/
directory.
If you want to build an über-jar, execute the following command:
./mvnw package -Dmaven.test.skip=true -Dquarkus.package.type=uber-jar
1
- 运行jar
The application is now runnable using java -jar target/quarkus-app/quarkus-run.jar
or java -jar target/server-1.0-SNAPSHOT-runner.jar
Use nohup
to start the service silently:
nohup java -jar target/quarkus-app/quarkus-run.jar >catalina.out 2>&1 &
# 前端
yarn build
1
Upload the dist
directory to the server and configure nginx