https://techblog.woowahan.com/2661/
Detail
[https://issueexplorer.com/issue/springfox/springfox/3909](https://issueexplorer.com/issue/springfox/springfox/3909
<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>
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.ant("/api/v1/**"))
.build();
}
}
4. http://localhost:8080/swagger-ui.html 에 접속하여 swagger 확인
메서드 선택 후 Try it out 버튼 클릭
data 입력 후 excute 버튼 클릭
response 부분에서 결과 확인
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.forCodeGeneration(true)
.host("127.0.0.1:8080")
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.ant("/api/v1/**"))
.build();
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("Stock Service")
.description("OpenAPI Document")
.version("1.0")
.license("Apache 2.0")
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0")
.build();
}
}
https://velog.io/@jayjay28/HATEOAS
https://woowabros.github.io/r&d/2017/06/13/apigateway.html https://ssipflow.github.io/msa/Spring-Cloud-API-Gateway-02/
https://woowabros.github.io/experience/2019/05/29/feign.html
https://techblog.woowahan.com/2630/
https://techblog.woowahan.com/2657/
https://woowabros.github.io/experience/2017/08/21/hystrix-tunning.html