参考地址: https://www.52pojie.cn/forum.php?mod=viewthread&tid=846146

exe4j 下载地址: https://exe4j.apponic.com/

1: maven配置

<build>
        <finalName>test</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.*</include>
                </includes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.*</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
View Code

 mvn package 打成 test.jar

2:exe4j 把test.jar打成 exe步骤

1准备一个

12-21 12:42