The core ArgumentResolvers provided in the application may not cover all the use cases for argument resolution, and the framework has been built to allow for the consumers to provide their own resolver easily. See core-how-to-implement-custom-argument-resolver.md for more details about how to build an ArgumentResolver.
- This relies on the default ArgumentResolverService being used and therefore it cannot be overridden with a custom implementation. See the QueueListenerConfiguration for more information about how the ArgumentResolvers are collected.
-
Build your ArgumentResolver by following the guide provided by core-how-to-implement-custom-argument-resolver.md.
-
Add this bean in the Spring Context by annotating it with a
@Component
(or other equivalent annotation) or by providing it as a bean in a@Configuration
class.@Configuration public class MyConfiguration { @Bean public ArgumentResolver userGroupArgumentResolver() { return new UserGroupArgumentResolver(); } }
At this point the default ArgumentResolverService should contain this custom argument resolver, and it should be applied during execution of the framework. This is because all ArgumentResolver beans are including in the underlying service.