if allows conditional execution of nested interceptors.
Example Configuration
if:
test: method == 'POST'
language: SpEL
flow:
- log: {} # nested plugins here
else:
- return: {}
if:
test: method == 'POST'
language: SpEL
flow:
- log: {} # nested plugins here
else:
- return: {}
Syntax
if:
test: <string> # required
'$ref': <string>
else:
- <flow>
flow:
- <flow>
language: groovy
xmlConfig: {}
if:
test: <string> # required
'$ref': <string>
else:
- <flow>
flow:
- <flow>
language: groovy
xmlConfig: {}
Attributes
| Name | Required | Default | Description | Examples |
|---|---|---|---|---|
| $ref | false | - | Reference a component defined under components. | - |
| language | false | SpEL | Language of the 'test' condition | SpEL, groovy, jsonpath, xpath |
| test | true | - | Condition to be tested |
|