I'm working on a Spring boot 2.7.7 + Spring integration application that works as a webservice proxy: any URL fed to the webservice is converted to the URL of one of many third-party services following some business rules.
The accepted URLs cannot be listed explicitly. Fortunately, although the inboundGateway documentation doesn't mention it explicitly, one can actually use an Ant path pattern as parameter:
@Bean
public IntegrationFlow proxyFlow() {
...
return IntegrationFlows.from(Http.inboundGateway("/**")
... handle/transform and so on
.get();
}
The proxy itself is working as intended, but I need to add a Swagger UI using OpenAPI. Once added to the project, it provides the OAS documentation under http://<host>:<port>/<context-path>/v3/api-docs
and the swagger ui under http://<host>:<port>/<context-path>/swagger-ui.html
.
Unfortunately, the /swagger-ui.html
URL is not reachable since it is caught by the Http inbound gateway, while, surprisingly, the /v3/api-docs
isn't (it is reachable).
Is there a way to tell the inbound gateway to ignore this specific URL path while consuming all the other paths?