@AutoConfiguration
@ConditionalOnClass(value=org.axonframework.spring.config.SpringConfigurer.class)
@AutoConfigureAfter(value={AxonAutoConfiguration.class,JpaAutoConfiguration.class,JpaEventStoreAutoConfiguration.class,NoOpTransactionAutoConfiguration.class,TransactionAutoConfiguration.class})
public class InterceptorAutoConfiguration
extends Object
MessageHandlerInterceptors and
MessageDispatchInterceptor and registers them with the respective buses and gateways.
Note: This class use a hack approach! Because some gateways/buses (or custom interceptors provided by the framework user) need an axonConfiguration to initialize, the usual way of registering interceptors in the ConfigurerModule.onInitialize method does not work for them. This is due to a circular reference caused e.g. by JpaJavaxEventStoreAutoConfiguration. So we register them by injecting gateway/bus components in to the InitializingBean function and register the interceptors there.
| Constructor and Description |
|---|
InterceptorAutoConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.beans.factory.InitializingBean |
commandDispatchInterceptorConfigurer(org.axonframework.commandhandling.gateway.CommandGateway commandGateway,
Optional<List<org.axonframework.messaging.MessageDispatchInterceptor<? super org.axonframework.commandhandling.CommandMessage<?>>>> interceptors) |
org.springframework.beans.factory.InitializingBean |
commandHandlerInterceptorConfigurer(org.axonframework.commandhandling.CommandBus commandBus,
Optional<List<org.axonframework.messaging.MessageHandlerInterceptor<? super org.axonframework.commandhandling.CommandMessage<?>>>> interceptors) |
org.springframework.beans.factory.InitializingBean |
eventDispatchInterceptorConfigurer(org.axonframework.eventhandling.gateway.EventGateway eventGateway,
Optional<List<org.axonframework.messaging.MessageDispatchInterceptor<? super org.axonframework.eventhandling.EventMessage<?>>>> interceptors) |
org.springframework.beans.factory.InitializingBean |
messageHandlerInterceptorConfigurer(org.axonframework.config.EventProcessingConfigurer eventProcessingConfigurer,
Optional<List<org.axonframework.messaging.MessageHandlerInterceptor<? super org.axonframework.eventhandling.EventMessage<?>>>> interceptors) |
org.springframework.beans.factory.InitializingBean |
queryDispatchInterceptorConfigurer(org.axonframework.queryhandling.QueryGateway queryGateway,
Optional<List<org.axonframework.messaging.MessageDispatchInterceptor<? super org.axonframework.queryhandling.QueryMessage<?,?>>>> interceptors) |
org.springframework.beans.factory.InitializingBean |
queryHandlerInterceptorConfigurer(org.axonframework.queryhandling.QueryBus queryBus,
Optional<List<org.axonframework.messaging.MessageHandlerInterceptor<? super org.axonframework.queryhandling.QueryMessage<?,?>>>> interceptors) |
@Bean
@ConditionalOnBean(value=org.axonframework.messaging.MessageDispatchInterceptor.class)
public org.springframework.beans.factory.InitializingBean commandDispatchInterceptorConfigurer(org.axonframework.commandhandling.gateway.CommandGateway commandGateway,
Optional<List<org.axonframework.messaging.MessageDispatchInterceptor<? super org.axonframework.commandhandling.CommandMessage<?>>>> interceptors)
@Bean
@ConditionalOnBean(value=org.axonframework.messaging.MessageDispatchInterceptor.class)
public org.springframework.beans.factory.InitializingBean eventDispatchInterceptorConfigurer(org.axonframework.eventhandling.gateway.EventGateway eventGateway,
Optional<List<org.axonframework.messaging.MessageDispatchInterceptor<? super org.axonframework.eventhandling.EventMessage<?>>>> interceptors)
@Bean
@ConditionalOnBean(value=org.axonframework.messaging.MessageDispatchInterceptor.class)
public org.springframework.beans.factory.InitializingBean queryDispatchInterceptorConfigurer(org.axonframework.queryhandling.QueryGateway queryGateway,
Optional<List<org.axonframework.messaging.MessageDispatchInterceptor<? super org.axonframework.queryhandling.QueryMessage<?,?>>>> interceptors)
@Bean
@ConditionalOnBean(value=org.axonframework.messaging.MessageHandlerInterceptor.class)
public org.springframework.beans.factory.InitializingBean commandHandlerInterceptorConfigurer(org.axonframework.commandhandling.CommandBus commandBus,
Optional<List<org.axonframework.messaging.MessageHandlerInterceptor<? super org.axonframework.commandhandling.CommandMessage<?>>>> interceptors)
@Bean
@ConditionalOnBean(value=org.axonframework.messaging.MessageHandlerInterceptor.class)
public org.springframework.beans.factory.InitializingBean queryHandlerInterceptorConfigurer(org.axonframework.queryhandling.QueryBus queryBus,
Optional<List<org.axonframework.messaging.MessageHandlerInterceptor<? super org.axonframework.queryhandling.QueryMessage<?,?>>>> interceptors)
@Bean
public org.springframework.beans.factory.InitializingBean messageHandlerInterceptorConfigurer(org.axonframework.config.EventProcessingConfigurer eventProcessingConfigurer,
Optional<List<org.axonframework.messaging.MessageHandlerInterceptor<? super org.axonframework.eventhandling.EventMessage<?>>>> interceptors)
Copyright © 2010–2025. All rights reserved.