Example usage for org.springframework.integration.http.inbound RequestMapping setPathPatterns

List of usage examples for org.springframework.integration.http.inbound RequestMapping setPathPatterns

Introduction

In this page you can find the example usage for org.springframework.integration.http.inbound RequestMapping setPathPatterns.

Prototype

public void setPathPatterns(String... pathPatterns) 

Source Link

Usage

From source file:simple.flow.Application.java

@Bean
public HttpRequestHandlingMessagingGateway httpGate1() {
    HttpRequestHandlingMessagingGateway gateway = new HttpRequestHandlingMessagingGateway(true);
    RequestMapping mapping = new RequestMapping();
    mapping.setMethods(HttpMethod.POST);
    mapping.setPathPatterns("/requestChannel1");
    gateway.setRequestMapping(mapping);/* ww  w . j ava2  s. co m*/
    gateway.setRequestChannel(requestChannel1());
    gateway.setRequestPayloadType(String.class);
    return gateway;
}

From source file:simple.flow.Application.java

@Bean
public HttpRequestHandlingMessagingGateway httpGate2() {
    HttpRequestHandlingMessagingGateway gateway = new HttpRequestHandlingMessagingGateway(true);
    RequestMapping mapping = new RequestMapping();
    mapping.setMethods(HttpMethod.POST);
    mapping.setPathPatterns("/requestChannel2");
    gateway.setRequestMapping(mapping);/*  w  ww .j  a  v a2 s.  c o  m*/
    gateway.setRequestChannel(requestChannel2());
    gateway.setRequestPayloadType(String.class);
    return gateway;
}

From source file:soap.client.Application.java

@Bean
public HttpRequestHandlingMessagingGateway httpGate() {
    HttpRequestHandlingMessagingGateway gateway = new HttpRequestHandlingMessagingGateway(true);
    RequestMapping mapping = new RequestMapping();
    mapping.setMethods(HttpMethod.GET);/*  ww w . j a v  a 2 s  .c  om*/
    mapping.setPathPatterns("/foo");
    gateway.setRequestMapping(mapping);
    gateway.setRequestChannel(requestChannel());
    gateway.setRequestPayloadType(String.class);
    return gateway;
}

From source file:rest.json.Application.java

@Bean
public HttpRequestHandlingMessagingGateway httpGate() {
    HttpRequestHandlingMessagingGateway gateway = new HttpRequestHandlingMessagingGateway(true);
    RequestMapping mapping = new RequestMapping();
    mapping.setMethods(HttpMethod.POST);
    mapping.setPathPatterns("/foo");
    gateway.setRequestMapping(mapping);//from  w ww  .ja v  a  2  s  .c o  m
    gateway.setRequestChannel(requestChannel());
    gateway.setRequestPayloadType(String.class);
    return gateway;
}

From source file:org.springframework.integration.aws.inbound.SnsInboundChannelAdapter.java

public SnsInboundChannelAdapter(AmazonSNS amazonSns, String... path) {
    super(false);
    Assert.notNull(amazonSns, "'amazonSns' must not be null.");
    Assert.notNull(path, "'path' must not be null.");
    Assert.noNullElements(path, "'path' must not contain null elements.");
    this.notificationStatusResolver = new NotificationStatusResolver(amazonSns);
    RequestMapping requestMapping = new RequestMapping();
    requestMapping.setMethods(HttpMethod.POST);
    requestMapping.setHeaders("x-amz-sns-message-type");
    requestMapping.setPathPatterns(path);
    this.jackson2HttpMessageConverter
            .setSupportedMediaTypes(Arrays.asList(MediaType.APPLICATION_JSON_UTF8, MediaType.TEXT_PLAIN));
    super.setRequestMapping(requestMapping);
    super.setStatusCodeExpression(new ValueExpression<>(HttpStatus.NO_CONTENT));
    super.setMessageConverters(
            Collections.<HttpMessageConverter<?>>singletonList(this.jackson2HttpMessageConverter));
    super.setRequestPayloadType(HashMap.class);
}