org.springframework.messaging.handler.annotation.Payload.expression()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中org.springframework.messaging.handler.annotation.Payload.expression()方法的一些代码示例,展示了Payload.expression()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Payload.expression()方法的具体详情如下:
包路径:org.springframework.messaging.handler.annotation.Payload
类名称:Payload
方法名:expression

Payload.expression介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-framework

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

代码示例来源:origin: spring-projects/spring-integration

@Override
public boolean supportsParameter(MethodParameter parameter) {
  Payload ann = parameter.getParameterAnnotation(Payload.class);
  return ann != null && StringUtils.hasText(ann.expression());
}

代码示例来源:origin: spring-projects/spring-integration

@Override
public Object resolveArgument(MethodParameter parameter, Message<?> message) throws Exception {
  Expression expression = this.expressionCache.get(parameter);
  if (expression == null) {
    Payload ann = parameter.getParameterAnnotation(Payload.class);
    expression = EXPRESSION_PARSER.parseExpression(ann.expression()); // NOSONAR never null - supportsParameter()
    this.expressionCache.put(parameter, expression);
  }
  return evaluateExpression(expression, message.getPayload(), parameter.getParameterType());
}

代码示例来源:origin: org.springframework/spring-messaging

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

代码示例来源:origin: org.springframework.integration/spring-integration-core

@Override
public boolean supportsParameter(MethodParameter parameter) {
  Payload ann = parameter.getParameterAnnotation(Payload.class);
  return ann != null && StringUtils.hasText(ann.expression());
}

代码示例来源:origin: org.springframework.integration/spring-integration-core

@Override
public Object resolveArgument(MethodParameter parameter, Message<?> message) throws Exception {
  Expression expression = this.expressionCache.get(parameter);
  if (expression == null) {
    Payload ann = parameter.getParameterAnnotation(Payload.class);
    expression = EXPRESSION_PARSER.parseExpression(ann.expression()); // NOSONAR never null - supportsParameter()
    this.expressionCache.put(parameter, expression);
  }
  return evaluateExpression(expression, message.getPayload(), parameter.getParameterType());
}

代码示例来源:origin: spring-cloud/spring-cloud-stream

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

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-messaging

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

代码示例来源:origin: apache/servicemix-bundles

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

相关文章