Package org.springframework.messaging.handler.annotation

Examples of org.springframework.messaging.handler.annotation.Payload


    return true;
  }

  @Override
  public Object resolveArgument(MethodParameter param, Message<?> message) throws Exception {
    Payload annot = param.getParameterAnnotation(Payload.class);
    if ((annot != null) && StringUtils.hasText(annot.value())) {
      throw new IllegalStateException("@Payload SpEL expressions not supported by this resolver");
    }

    Object payload = message.getPayload();
    if (isEmptyPayload(payload)) {
      if (annot == null || annot.required()) {
        String paramName = getParameterName(param);
        BindingResult bindingResult = new BeanPropertyBindingResult(payload, paramName);
        bindingResult.addError(new ObjectError(paramName, "@Payload param is required"));
        throw new MethodArgumentNotValidException(message, param, bindingResult);
      }
View Full Code Here

TOP

Related Classes of org.springframework.messaging.handler.annotation.Payload

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.