The Spring Boot custom starter component defines a personalized Spring Boot starter that will automatically configure all the beans and property defaults for an Alfresco Event system client, making it easy to implement a client for the Alfresco Java Event API. As expected, the use of this component makes the assumption that the developer is creating an integration in the context of a Spring Boot application.
This component is defined in the alfresco-java-event-api-spring-boot-starter and the alfresco-java-event-api-spring-boot modules.
The core class of this module is AlfrescoEventsAutoConfiguration . It is a Spring configuration class that automatically define the beans required to do the following actions:
- Define a Spring Integration flow to read the event messages from the ActiveMQ topic using a JMS channel adapter.
- Transform the message payload from JSON to a RepoEvent object.
- Route the corresponding event messages to up to 2 other channels:
- A channel to use pure Spring Integration handling if the property alfresco.events.enableSpringIntegration is enabled.
- A channel to use event handling (from the event handling library) if the property alfresco.events.enableHandlers is enabled.
All this auto-configuration is enabled as soon as the dependency org.alfresco:alfresco-java-event-api-spring-boot-starter is added to a Spring Boot project.