File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
src/main/java/br/com/spring/restful/config Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ package br .com .spring .restful .config ;
2+
3+ import org .springframework .context .annotation .Bean ;
4+ import org .springframework .context .annotation .Configuration ;
5+
6+ import springfox .documentation .builders .PathSelectors ;
7+ import springfox .documentation .builders .RequestHandlerSelectors ;
8+ import springfox .documentation .spi .DocumentationType ;
9+ import springfox .documentation .spring .web .plugins .Docket ;
10+ import springfox .documentation .swagger2 .annotations .EnableSwagger2 ;
11+
12+ @ Configuration
13+ @ EnableSwagger2
14+ public class SwaggerConfig {
15+ @ Bean
16+ public Docket api () {
17+ return new Docket (DocumentationType .SWAGGER_2 )
18+ .select ()
19+ .apis (RequestHandlerSelectors .any ())
20+ .paths (PathSelectors .any ())
21+ .build ();
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments