[swagger2] 설정방법
api 를 내보내기 위해서..
pom.xml
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
application
@EnableSwagger2
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any()) // 현재 RequestMapping으로 할당된 모든 URL 리스트를 추출
.paths(PathSelectors.ant("/api/**")) // 그중 /api/** 인 URL들만 필터링
.build();
}
'server' 카테고리의 다른 글
[spring boot]jpa 설정방법 (0) | 2020.05.18 |
---|---|
[spring boot]template might not exist or might not be accessible by any of the configured Template Resolvers 해결방법 (0) | 2020.05.18 |
[spring boot]inMemoryDatabaseShutdownExecutor 서버 처음 연결 할 시 이슈해결방법 (0) | 2020.05.15 |
[ubuntu]프로세스 강제종료하는방법 (0) | 2020.05.13 |
[ubuntu]spring boot project rebuild하는 방법 (0) | 2020.05.13 |