Class SpringBeanParameterResolver

java.lang.Object
io.fluxzero.sdk.configuration.spring.SpringBeanParameterResolver
All Implemented Interfaces:
io.fluxzero.common.handling.ParameterResolver<Object>

public class SpringBeanParameterResolver extends Object implements io.fluxzero.common.handling.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();
 }
 
  • Constructor Details

    • SpringBeanParameterResolver

      public SpringBeanParameterResolver()
  • Method Details