Class SpringBeanParameterResolver

java.lang.Object
io.fluxcapacitor.javaclient.configuration.spring.SpringBeanParameterResolver
All Implemented Interfaces:
ParameterResolver<Object>

public class SpringBeanParameterResolver extends Object implements ParameterResolver<Object>
Resolves handler method parameters annotated with Autowired from the Spring application context.

This resolver allows dependency injection of Spring-managed beans directly into handler methods. It supports both type-based and Qualifier-based resolution, and will prioritize beans marked as @Primary.

If no bean can be resolved unambiguously (e.g., multiple candidates and no qualifier or primary), the parameter is not injected and a warning is logged.

Example:


 @HandleCommand
 public void handle(MyCommand command, @Autowired MyService myService) {
     myService.performAction();
 }