目录

 

设置

打包jar

执行jar


设置

pom.xml中的build修改为如下内容:

<build>
    <finalName>ques-bank-api</finalName>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <executable>true</executable>
                <jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
                <!--<includeSystemScope>true</includeSystemScope>-->
           
</configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <skipTests>true</skipTests>
                <forkMode>once</forkMode>
                <argLine>-Dfile.encoding=UTF-8</argLine>
            </configuration>
        </plugin>
    </plugins>
</build>

 

 

 

打包jar

IDEA如何快速打包可执行的jar和运行jar

 

 

IDEA如何快速打包可执行的jar和运行jar

执行jar

下面以window操作系统举例说明:

新建start.bat

start.bat的内容为:

@echo off

C:\oms\jdk1.8.0_181\bin\java.exe -jar SpringBootFeishu.jar

pause

相关文章:

  • 2021-10-05
  • 2021-09-06
  • 2021-07-08
  • 2021-06-30
  • 2021-06-29
  • 2021-12-02
  • 2021-08-30
  • 2022-12-23
猜你喜欢
  • 2021-12-13
  • 2021-10-05
  • 2021-09-19
  • 2022-12-23
  • 2021-03-31
  • 2021-04-02
  • 2021-10-18
相关资源
相似解决方案