Configure Handler Enhancer in Spring Boot

Hi,

I’m trying to create a handler enhander referring to the document .

Using spring boot , it can be configured as following. But the interface HandlerDefinition and HandlerEnhancerDefinition are actually not adaptable, the following code will has syntax error. Is there something missing in the document ?

// somewhere in configuration @Bean public HandlerDefinition eventStorageEngine() { return new MethodCommandHandlerDefinition(); }

Regards,
Sean

Hi Sean,

yes, it seems the documentation is not clear enough about the difference between a HandlerDefinition and a HandlerEnhancerDefinition. The first defines which methods are actually Handlers, the second allows additional logic to be added around Handler methods.

In the code example, the bean name is also confusing and may lead to problems, as there are likely other beans with the same name.

We’ll change the documentation accordingly.

Cheers,