Allows configuring HandlerMethodArgumentResolver beans on AnnotatedControllerConfigurer.
Comment From: maxhov
I see that the build fails on a missing @since in the Javadoc. Which version should I use here? Is it probable that it will make it into 3.3.0 still?
Comment From: philwebb
@maxhov I'm afraid we'll probably not get this into 3.3 since we just cut RC1, but feel free to use that as the @Since tag. We can fix it up later.
Comment From: bclozel
Why not auto-configure HandlerMethodArgumentResolver beans on that component in the existing configuration? To me customizers are useful when lots of options exist and when applications want to contribute several.
Comment From: maxhov
@bclozel I chose this approach because it is also used for GraphQlSourceBuilder via GraphQlSourceBuilderCustomizer and it seemed sensible to take the same approach.
Comment From: bclozel
The org.springframework.graphql.execution.GraphQlSource.Builder not only configures many things, but also is the gateway to configuring the GraphQL engine itself. The AnnotatedControllerConfigurer has less options and in this case, the HandlerMethodArgumentResolver are ordered, which means AnnotatedControllerConfigurerCustomizer should be ordered themselves or a single AnnotatedControllerConfigurerCustomizer should add all argument resolvers.
I think that as a first step, we should consider HandlerMethodArgumentResolver beans and set them on the configurer in an ordered fashion. I think we're too late in the cycle to consider this feature now.
Comment From: maxhov
@bclozel I am not sure I understand. Registering either HandlerMethodArgumentResolver or AnnotatedControllerConfigurerCustomizer beans both need to be explicitely ordered via @Order/Ordered at the bean declaration, so which bean is defined would not really matter for that purpose?
Maybe exposing more methods on the AnnotatedControllerConfigurer API is not desirable at this moment, I can change the implementation to accepting HandlerMethodArgumentResolver beans and registering them. Let me know if you are open to that, then I will change the implementation as such. I understand that for 3.3 this may be too late.
Comment From: bclozel
Maybe exposing more methods on the AnnotatedControllerConfigurer API is not desirable at this moment, I can change the implementation to accepting HandlerMethodArgumentResolver beans and registering them. Let me know if you are open to that, then I will change the implementation as such. I understand that for 3.3 this may be too late.
@maxhov Yes please! Let us know if you have some time for this or we will take care of it.
Comment From: maxhov
@maxhov Yes please! Let us know if you have some time for this or we will take care of it.
@bclozel I updated the implementation as such.
Comment From: bclozel
Thanks @maxhov for your contribution, this will be released with our next milestone.