spring_reference/III. Using Spring Boot/13.1.4. Using the Spring Bo...

15 lines
643 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 13.1.4. 使用Spring Boot Maven插件
Spring Boot包含一个[Maven插件](../VIII. Build tool plugins/58. Spring Boot Maven plugin.md)它可以将项目打包成一个可执行jar。如果想使用它你可以将该插件添加到`<plugins>`节点处:
```xml
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
```
**注**如果使用Spring Boot starter parent pom你只需要添加该插件而无需配置它除非你想改变定义在partent中的设置。