Cant expose spring integration flow apis, with swagger documentation
I have some apis exposed using spring integration. We tried document it, with springfox dependency (swagger2). But when access to: http://localhost:8080/myProject/swagger-ui.html, the page is empty, we cant see the services with swagger format
My example;
Class definition:
@Configuration
@EnableSwagger2
public class ConsultaBdnFlow {
....
}
Swagger configuration:
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build();
}
Swagger Dependencies:
<!-- Start Swagger 2 with SpringFox -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.3.0</version>
</dependency>
<!-- End Swagger 2 with SpringFox -->
Flow to expose the service:
@Bean
public IntegrationFlow bdnBlacklistFlow() {
return IntegrationFlows
.from(Http.inboundGateway("/consultas/bdn")
.requestPayloadType(String.class)
.requestChannel(requestBlacklistChannel())
.replyChannel(replyBlacklistChannel())
)
.get();
}
When run the project we can access to http://localhost:8080/swagger-ui.html, but dont see the service swagger document