B.2. Spring Boot Maven 플러그인 사용
Spring Boot 플러그인을 사용하는 방법에 대한 일반적인 지침은 https://docs.spring.io/spring-boot/docs/current/maven-plugin/reference/htmlsingle/#using 에서 확인할 수 있습니다. 다음 예제에서는 Spring Boot에 spring-boot-maven-plugin
을 사용하는 방법을 보여줍니다.
Spring Boot Maven 플러그인에 대한 자세한 내용은 https://docs.spring.io/spring-boot/docs/current/maven-plugin/reference/htmlsingle/ 링크를 참조하십시오.
B.2.1. Spring Boot 2에 Spring Boot Maven 플러그인 사용
다음 예제에서는 Spring Boot 2용 spring-boot-maven-plugin
을 사용하는 방법을 보여줍니다.
예제
<project> <modelVersion>4.0.0</modelVersion> <groupId>com.redhat.fuse</groupId> <artifactId>spring-boot-camel</artifactId> <version>1.0-SNAPSHOT</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <!-- configure the Fuse version you want to use here --> <fuse.bom.version>7.8.0.fuse-sb2-780038-redhat-00001</fuse.bom.version> <!-- maven plugin versions --> <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version> <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version> </properties> <build> <defaultGoal>spring-boot:run</defaultGoal> <plugins> <plugin> <groupId>org.jboss.redhat-fuse</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>${fuse.bom.version}</version> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <repositories> <repository> <id>redhat-ga-repository</id> <url>https://maven.repository.redhat.com/ga</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>redhat-ea-repository</id> <url>https://maven.repository.redhat.com/earlyaccess/all</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>redhat-ga-repository</id> <url>https://maven.repository.redhat.com/ga</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> <pluginRepository> <id>redhat-ea-repository</id> <url>https://maven.repository.redhat.com/earlyaccess/all</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories> </project>