1.5. Maven を使用して Spring Boot アプリケーション用の Camel を生成する
Maven アーキタイプ org.apache.camel.archetypes:camel-archetype-spring-boot:3.14.5.redhat-00032 を使用して、Camel Spring Boot アプリケーションを生成できます。
手順
以下のコマンドを実行します。
mvn archetype:generate \ -DarchetypeGroupId=org.apache.camel.archetypes \ -DarchetypeArtifactId=camel-archetype-spring-boot \ -DarchetypeVersion=3.14.5.redhat-00032 \ -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