Configuring spring-boot-maven-plugin

When we build applications using Spring Boot, there are a couple of situations that are possible:

  • We would want to run the applications in place without building a JAR or a WAR
  • We would want to build a JAR and a WAR for later deployment

The spring-boot-maven-plugin dependency provides capabilities for both of the preceding situations. The following snippet shows how we can configure spring-boot-maven-plugin in an application:

    <build>     <plugins>      <plugin>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-maven-plugin</artifactId>      </plugin>     </plugins>    </build>

The spring-boot-maven-plugin dependency provides several goals for a Spring Boot application. The most popular goal is run (this ...

Get Mastering Spring 5.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.