1. Proxies and Flow

if

if allows conditional execution of nested interceptors.

<if test="method == 'POST'" language="SpEL">
         ...
 </if>

Can be used in:

serviceProxy, chainDef, for, stompProxy, time, if, registration, wsStompReassembler, interceptor, chain and transport

Attributes

NameRequiredDefaultDescriptionExamples
test true - Condition to be tested
  • request.isJSON()
  • params['limit'] >= 0
  • statusCode matches '[45]\d\d'

language false SpEL
Language of the 'test' condition
SpEL, groovy, jsonpath, xpath

Child Elements

ElementsDescriptionCardinality
echo 0..*
rewriter 0..*
response 0..*
request 0..*
abort 0..*
global 0..*
xmlConfig 0..1
echo 0..*
rewriter 0..*
response 0..*
request 0..*
abort 0..*
global 0..*

Other optional Child Elements

greaser, accessControl, exchangeStore, clamav, transform, httpClient, choose, APIsJSON, dispatching, tokenValidator, webServiceExplorer, internalRouting, if, xml2Json, ruleMatching, logContext, webServer, oauth2PermissionChecker, acmeHttpChallenge, apiDocs, setCookies, log, return, tcp, setHeader, xmlContentFilter, webSocket, userFeature, rateLimiter, adminConsole, cors, interceptor, paddingHeader, chain, javascript, setProperty, destination, requireAuth, oauth2authserver, beautifier, static, clusterNotification, regExReplacer, analyser, json2Xml, throttle, xmlProtection, openapiValidator, balancer, authHead2Body, rest2Soap, http2xml, jwtSign, call, xenAuthentication, groovy, shadowing, validator, wsdlRewriter, accessLog, sampleSoapService, soapBody, headerFilter, kubernetesValidation, for, flowInitiator, login, reverseProxying, openapiPublisher, soapOperationExtractor, index, soap2Rest, time, stompClient, soapStackTraceFilter, apiKey, basicAuthentication, formValidation, prometheus, adminApi, template, ntlm, statisticsProvider, setBody, idempotency, statisticsJDBC, openTelemetry, jwtAuth, counter, oauth2Resource2, accountRegistration, limit, wsaEndpointRewriter, statisticsCSV, jsonProtection, wsdlPublisher, cache, shutdown, graphQLProtection, methodOverride, replace, xmlConfig, greaser, accessControl, exchangeStore, clamav, transform, httpClient, choose, APIsJSON, dispatching, tokenValidator, webServiceExplorer, internalRouting, if, xml2Json, ruleMatching, logContext, webServer, oauth2PermissionChecker, acmeHttpChallenge, apiDocs, setCookies, log, return, tcp, setHeader, xmlContentFilter, webSocket, userFeature, rateLimiter, adminConsole, cors, interceptor, paddingHeader, chain, javascript, setProperty, destination, requireAuth, oauth2authserver, beautifier, static, clusterNotification, regExReplacer, analyser, json2Xml, throttle, xmlProtection, openapiValidator, balancer, authHead2Body, rest2Soap, http2xml, jwtSign, call, xenAuthentication, groovy, shadowing, validator, wsdlRewriter, accessLog, sampleSoapService, soapBody, headerFilter, kubernetesValidation, for, flowInitiator, login, reverseProxying, openapiPublisher, soapOperationExtractor, index, soap2Rest, time, stompClient, soapStackTraceFilter, apiKey, basicAuthentication, formValidation, prometheus, adminApi, template, ntlm, statisticsProvider, setBody, idempotency, statisticsJDBC, openTelemetry, jwtAuth, counter, oauth2Resource2, accountRegistration, limit, wsaEndpointRewriter, statisticsCSV, jsonProtection, wsdlPublisher, cache, shutdown, graphQLProtection, methodOverride, replace