Module io.fluxzero.sdk
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected UnaryOperator<Object> booleanmatches(Parameter parameter, Annotation methodAnnotation, Object value) resolve(Parameter p, Annotation methodAnnotation) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.fluxzero.common.handling.ParameterResolver
determinesSpecificity, filterMessage
-
Constructor Details
-
SpringBeanParameterResolver
public SpringBeanParameterResolver()
-
-
Method Details