Overview
The integration builder hierarchy provides builders for different use cases:- AbstractIntegrationBuilder: Base class with methods common to all products
- IntegrationBuilder: Concrete implementation for general use
- AbstractGitIntegrationBuilder: For Git-based integrations
- AbstractMavenGitIntegrationBuilder: For Maven projects from Git
- SpringBootIntegrationBuilder: Spring Boot-specific features
Creating an integration builder
Basic usage
The most common builder isIntegrationBuilder:
Spring Boot builder
For Spring Boot-specific features:Route builders
ThefromRouteBuilder() method accepts Camel route builders and transforms them using JavaParser.
Route builder requirements
Route builders in TNB have specific requirements due to code transformation:
- Must be named classes (anonymous classes will fail)
- Final fields values are inlined
- Only primitive values can be processed
- Everything must be in the same file (use
addClass()for additional classes)
Example route builder
Multiple route builders
Add multiple route builders to a single integration:Dependencies
Add Camel components and other dependencies to your integration.Camel components
Dependencies without a colon are assumed to be Camel components:camel-timerfor Camel Spring Bootcamel-quarkus-timerfor Camel Quarkus
Maven coordinates
Use Maven GA[V] format for non-Camel dependencies:Direct dependency objects
Properties
Configure application and system properties for your integration.Application properties
These becomeapplication.properties in the generated application: