12.2. Camel Karaf アプリケーションの構造
Camel Karaf アプリケーションのディレクトリー構造は以下のようになります。
├── pom.xml ├── README.md ├── configuration │ └── settings.xml └── src ├── main │ ├── jkube │ │ └── deployment.yml │ ├── java │ │ └── org │ │ └── example │ │ └── fis │ └── resources │ ├── assembly │ │ └── etc │ │ └── org.ops4j.pax.logging.cfg │ └── OSGI-INF │ └── blueprint │ └── camel-log.xml └── test └── java └── org └── example └── fis
├── pom.xml
├── README.md
├── configuration
│ └── settings.xml
└── src
├── main
│ ├── jkube
│ │ └── deployment.yml
│ ├── java
│ │ └── org
│ │ └── example
│ │ └── fis
│ └── resources
│ ├── assembly
│ │ └── etc
│ │ └── org.ops4j.pax.logging.cfg
│ └── OSGI-INF
│ └── blueprint
│ └── camel-log.xml
└── test
└── java
└── org
└── example
└── fis
このうち、Karaf アプリケーションの開発に重要なファイルは次のとおりです。
- 1
- pom.xml: 追加の依存関係が含まれます。依存関係を
pom.xml
ファイルに追加できます。たとえば、ロギングの場合は SLF4J を使用できます。Copy to Clipboard Copied! Toggle word wrap Toggle overflow <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency>
<dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency>
- 2
- src/main/jkube/deployment.yml: openshift-maven-plugin によって生成されるデフォルトの OpenShift 設定ファイルにマージされる追加設定を提供します。注記
このファイルは Karaf アプリケーションの一部として使用されませんが、CPU やメモリー使用量などのリソースを制限するためにすべてのクイックスタートで使用されます。
- 3
- org.ops4j.pax.logging.cfg: ログレベルのカスタマイズ方法を示し、デフォルトのログレベルである INFO ではなく、DEBUG を設定します。
- 4
- camel-log.xml: アプリケーションのソースコードが含まれます。