简体   繁体   English

如何为我的Java应用程序+ mysql创建可安装文件(从maven build spring boot创建的jar)

[英]How to create installable for my java application + mysql (jar created from maven build spring boot)

I want to test my application in other laptop, that doesn't contain any jre or mysql installed on it, so i must manually install those softwares in order to run my jar file on it. 我想在其他笔记本电脑上测试我的应用程序,其中没有安装任何jre或mysql,因此我必须手动安装这些软件才能在其上运行我的jar文件。 I want to know how installable are made? 我想知道如何安装? I need to install : JRE,MySql Workbench and the sql file to create database , and make the jar file on desktop. 我需要安装:JRE,MySql Workbench和sql文件来创建数据库,并在桌面上创建jar文件。
Note: I created the exe with launch4j, so i need just to create the installable file. 注意:我使用launch4j创建了exe,因此我只需要创建可安装文件。

I suggest 我建议

  1. Use flyway or liquibase (or any other) to handle your DDL migrations 使用flyway或liquibase(或任何其他)来处理DDL迁移
  2. Dockerize the application (externalize configuration as env variables) Dockerize应用程序(将配置外部化为env变量)
  3. Setup a nice docker compose using you app image, mysql and whatever else you need 使用您的应用程序映像,mysql和您需要的其他任何东西设置一个不错的docker compose
  4. Push to a docker registry and share 推送到Docker注册表并共享

Now you have something even more portable than your .exe file. 现在,您可以拥有比.exe文件更轻便的文件。

Regards. 问候。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 maven 的 spring 引导应用程序的构建库 jar - How a build library jar of spring boot application using maven 具有jar依赖项的Spring Boot应用程序在Maven构建后无法运行 - Spring Boot application with a jar dependency does not run after maven build Spring Boot Maven plugin - How do I build a zip file with Java jar file and script to run it? - Spring Boot Maven plugin - How do I build a zip file with Java jar file and script to run it? 如何从Spring Boot jar构建DockerImage - How to build DockerImage from Spring Boot jar 如何使用Maven插件正确构建Spring Boot far jar? - How to properly build a Spring Boot far jar using maven plugin? 如何在spring boot 2中使用groovy解释(使用spring-aop注释)2使用maven构建java应用程序? - How to use groovy interpreted (with spring-aop annotation) within an spring boot 2 java application build with maven? Java 9 spring启动应用程序的maven构建期间的RuntimeException - RuntimeException during maven build of Java 9 spring boot application 使用 Maven 构建 Spring Boot 应用程序遇到 Java 版本问题 - Spring Boot application build with Maven encounters Java Version Issue spring-boot Maven:如何使用主类创建可执行 jar? - spring-boot Maven: How to create executable jar with main class? 如何修复从 start 初始化的新 spring 启动应用程序的 Maven 构建中的错误。 - How to fix Error in Maven build for new spring boot application intialized from start.spring.io
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM