Update: 04/26/2017, updated implementation. Andy Brown credits for a clue.
Due to our coding agreement, we donβt have a specific prefix for our endpoints, so I was looking for a solution to exclude the endpoints of the actuator rather than include my own paths.
I came up with the following configuration to exclude only the endpoints of the actuator. Thus, I do not need to update the configuration when I add new endpoints, and I do not need to prefix my own endpoints to distinguish them from the endpoints of the actuator.
@Autowired @Bean public Docket swaggerSpringMvcPlugin(final EndpointHandlerMapping actuatorEndpointHandlerMapping) { ApiSelectorBuilder builder = new Docket(DocumentationType.SWAGGER_2) .useDefaultResponseMessages(false) .apiInfo(apiInfo()) .securitySchemes(securitySchemes()) .select();
source share