@Configuration
@EnableSwagger2
Agregamos los métodos dentro de la clase: public class SwaggerConfig
@Bean
public Docket apiDocket() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("com.softpang.apiAvikarMantenimiento.Controlador"))
.paths(PathSelectors.any())
.build()
.apiInfo(getApiInfo())
;
}
private ApiInfo getApiInfo() {
return new ApiInfo(
"API Description",
"API Description",
"1.0",
"https://irvinpanta.softpang.com/terms",
new Contact(
"Irvin Panta",
"https://irvinpanta.softpang.com",
"irvinpanta96@gmail.com"),
"LICENSE",
"LICENSE URL",
Collections.emptyList()
);
}
Ingresamos a http://localhost:8080/swagger-ui.html para ver la documentación

Dependencias necesarias. <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui --> <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 -->