3.5. Maven を使用した Spring Boot アプリケーション用の Camel 生成
Maven アーキタイプ org.apache.camel.archetypes:camel-archetype-spring-boot:4.10.7.redhat-00013 を使用して、Red Hat build of Apache Camel for Spring Boot アプリケーションを生成できます。
手順
以下のコマンドを実行します。
mvn archetype:generate \ -DarchetypeGroupId=org.apache.camel.archetypes \ -DarchetypeArtifactId=camel-archetype-spring-boot \ -DarchetypeVersion=4.10.7.redhat-00013 \ -DgroupId=com.redhat \ -DartifactId=csb-app \ -Dversion=1.0-SNAPSHOT \ -DinteractiveMode=falseアプリケーションをビルドします。
mvn package -f csb-app/pom.xmlアプリケーションを実行します。
java -jar csb-app/target/csb-app-1.0-SNAPSHOT.jarアプリケーションによって生成された Hello World 出力のコンソールログを調べて、アプリケーションが実行されていることを確認します。
com.redhat.MySpringBootApplication : Started MySpringBootApplication in 3.514 seconds (JVM running for 4.006) Hello World Hello World