org.springframework.messaging.handler.annotation.support.HeadersMethodArgumentResolver Java Examples
The following examples show how to use
org.springframework.messaging.handler.annotation.support.HeadersMethodArgumentResolver.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SimpAnnotationMethodMessageHandler.java From spring-analysis-note with MIT License | 6 votes |
protected List<HandlerMethodArgumentResolver> initArgumentResolvers() { ApplicationContext context = getApplicationContext(); ConfigurableBeanFactory beanFactory = (context instanceof ConfigurableApplicationContext ? ((ConfigurableApplicationContext) context).getBeanFactory() : null); List<HandlerMethodArgumentResolver> resolvers = new ArrayList<>(); // Annotation-based argument resolution resolvers.add(new HeaderMethodArgumentResolver(this.conversionService, beanFactory)); resolvers.add(new HeadersMethodArgumentResolver()); resolvers.add(new DestinationVariableMethodArgumentResolver(this.conversionService)); // Type-based argument resolution resolvers.add(new PrincipalMethodArgumentResolver()); resolvers.add(new MessageMethodArgumentResolver(this.messageConverter)); resolvers.addAll(getCustomArgumentResolvers()); resolvers.add(new PayloadMethodArgumentResolver(this.messageConverter, this.validator)); return resolvers; }
Example #2
Source File: SimpAnnotationMethodMessageHandler.java From java-technology-stack with MIT License | 6 votes |
protected List<HandlerMethodArgumentResolver> initArgumentResolvers() { ApplicationContext context = getApplicationContext(); ConfigurableBeanFactory beanFactory = (context instanceof ConfigurableApplicationContext ? ((ConfigurableApplicationContext) context).getBeanFactory() : null); List<HandlerMethodArgumentResolver> resolvers = new ArrayList<>(); // Annotation-based argument resolution resolvers.add(new HeaderMethodArgumentResolver(this.conversionService, beanFactory)); resolvers.add(new HeadersMethodArgumentResolver()); resolvers.add(new DestinationVariableMethodArgumentResolver(this.conversionService)); // Type-based argument resolution resolvers.add(new PrincipalMethodArgumentResolver()); resolvers.add(new MessageMethodArgumentResolver(this.messageConverter)); resolvers.addAll(getCustomArgumentResolvers()); resolvers.add(new PayloadArgumentResolver(this.messageConverter, this.validator)); return resolvers; }
Example #3
Source File: SimpAnnotationMethodMessageHandler.java From spring4-understanding with Apache License 2.0 | 6 votes |
protected List<HandlerMethodArgumentResolver> initArgumentResolvers() { ConfigurableBeanFactory beanFactory = (getApplicationContext() instanceof ConfigurableApplicationContext ? ((ConfigurableApplicationContext) getApplicationContext()).getBeanFactory() : null); List<HandlerMethodArgumentResolver> resolvers = new ArrayList<HandlerMethodArgumentResolver>(); // Annotation-based argument resolution resolvers.add(new HeaderMethodArgumentResolver(this.conversionService, beanFactory)); resolvers.add(new HeadersMethodArgumentResolver()); resolvers.add(new DestinationVariableMethodArgumentResolver(this.conversionService)); // Type-based argument resolution resolvers.add(new PrincipalMethodArgumentResolver()); resolvers.add(new MessageMethodArgumentResolver()); resolvers.addAll(getCustomArgumentResolvers()); resolvers.add(new PayloadArgumentResolver(this.messageConverter, this.validator)); return resolvers; }
Example #4
Source File: RqueueMessageHandler.java From rqueue with Apache License 2.0 | 5 votes |
@Override protected List<? extends HandlerMethodArgumentResolver> initArgumentResolvers() { List<HandlerMethodArgumentResolver> resolvers = new ArrayList<>(getCustomArgumentResolvers()); // Annotation-based argument resolution resolvers.add(new HeaderMethodArgumentResolver(this.conversionService, getBeanFactory())); resolvers.add(new HeadersMethodArgumentResolver()); // Type-based argument resolution resolvers.add(new PrincipalMethodArgumentResolver()); resolvers.add(new MessageMethodArgumentResolver(messageConverter)); resolvers.add(new PayloadArgumentResolver(messageConverter, null)); return resolvers; }