<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>3.0.0</version>
</dependency>
//application.yml 파일을 다음과 같이 수정
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
접근
3.x.x 버전은 이렇게 접근
http://localhost:8088/swagger-ui/index.html
http://localhost:8088/v2/api-docs
이전 버전
http://localhost:8088/swagger-ui.html
Swagger 클래스 추가
@Configuration
@EnableSwagger2
public class SwaggerConfig{
@Bean
public Docket api(){
return new Docket(DocumentationType.SWAGGER_2);
}
}
http://localhost:8088/v2/api-docs 화면
http://localhost:8088/swagger-ui/index.html 화면