只須要在pom.xml的<build>標籤中加上這個便可:spring
1 <build> 2 <finalName>my-spring-boot</finalName> <!-- 指定package生成的文件名爲my-spring-boot.jar --> 3 4 <plugins> 5 ...... 6 </plugins> 7 </build>