Class SpringBeanParameterResolver
java.lang.Object
io.fluxzero.sdk.configuration.spring.SpringBeanParameterResolver
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected UnaryOperator<Object> default booleanbooleanmatches(Parameter parameter, Annotation methodAnnotation, Object value) booleanmayApply(Executable method, Class<?> targetClass) resolve(Parameter p, Annotation methodAnnotation) default boolean
-
Constructor Details
-
SpringBeanParameterResolver
public SpringBeanParameterResolver()
-
-
Method Details
-
resolve
-
matches
-
computeParameterResolver
-
mayApply
-
determinesSpecificity
default boolean determinesSpecificity() -
test
-