We are using Axon 3.0 with Spring boot and I’m trying to apply Bean validation on our commands. I thought something like this would work:
public void configureValidation(CommandBus commandBus)
if(commandBus instanceof DistributedCommandBus)
((DistributedCommandBus) commandBus).registerDispatchInterceptor(new BeanValidationInterceptor());
But it doesn’t. For our unit tests, we were able to add validation like this though:
new AggregateTestFixture(…).registerCommandHandlerInterceptor(new BeanValidationInterceptor());
So the problem is not related to the validation framework. Any input on this?
Thanks in advance,