I am having a microservice which is spring cloud gateway implementation in kotlin. So as a part of a feature, i need to fail the start-up of this service if I found a specific combination of arguments in the filter configuration present in application.yaml. To give the filter cofiguration we are using inline notation. for example:
spring:
cloud:
gateway:
routes:
- id: test1
predicates:
- Path=/test1/**
filters:
- RewritePath=/test1/(?<segment>.*), /$\{segment}
- TLS= OPTIONAL, NONE, TEST
- id: test2
predicates:
- Path=/test2/**
filters:
- RewritePath=/test2/(?<segment>.*), /$\{segment}
- TLS= MANDATORY, NONE, TEST
So in this example configuration, TLS filter is having ags combination as MANDATORY with NONE, then in this case this service should fail at start saying "MANDATORY with NONE is not a right combination"
So any suggestion to achieve this ??