Advertisement
ArturCzopek

swagger-docket-regex

Apr 23rd, 2017
2,329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. @Getter
  2. @Setter
  3. @Configuration
  4. @EnableSwagger2
  5. @ConfigurationProperties(prefix = "myCoach.swagger")
  6. public class SwaggerConfiguration {
  7.  
  8.     //...
  9.  
  10.     @Bean
  11.     public Docket api() {
  12.         return new Docket(DocumentationType.SWAGGER_2)
  13.                 .apiInfo(apiInfo())
  14.                 .select()
  15.                 .apis(RequestHandlerSelectors.any())
  16.                 .paths(paths())
  17.                 .build();
  18.     }
  19.  
  20.     //...
  21.  
  22.  
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement