Skip to content

Instantly share code, notes, and snippets.

@rolroralra
Last active December 27, 2021 07:27
Show Gist options
  • Save rolroralra/ec5d3f3d095af2713c8d35aacbff5be7 to your computer and use it in GitHub Desktop.
Save rolroralra/ec5d3f3d095af2713c8d35aacbff5be7 to your computer and use it in GitHub Desktop.
TODO.md

Jacoco

https://techblog.woowahan.com/2661/


12 Factors App

https://12factor.net/ko/


Swagger

Detail

API Documentation

Issue

[https://issueexplorer.com/issue/springfox/springfox/3909](https://issueexplorer.com/issue/springfox/springfox/3909

1. Swagger 사용을 위한 Maven Dependency 추가

<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>

2.com.samsungsds.e2e.stock.config 패키지 생성

3.com.samsungsds.e2e.stock.config 패키지에 하위에 SwaggerConfig Class 생성

@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 확인

5. 실습2에서 작성한 재고 조회/등록/수정/삭제 API 확인 및 테스트

메서드 선택 후 Try it out 버튼 클릭

data 입력 후 excute 버튼 클릭
response 부분에서 결과 확인

6. Description 작성

@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();
  
    }
}


HATEOAS (Hypermedia As The Engine Of Application State)

https://velog.io/@jayjay28/HATEOAS


Zuul, Eureka (Api Gateway)

https://woowabros.github.io/r&d/2017/06/13/apigateway.html https://ssipflow.github.io/msa/Spring-Cloud-API-Gateway-02/


Feign

https://woowabros.github.io/experience/2019/05/29/feign.html

https://techblog.woowahan.com/2630/

https://techblog.woowahan.com/2657/


Hystrix

https://woowabros.github.io/experience/2017/08/21/hystrix-tunning.html


How to install NFS in CentOS

https://youngmind.tistory.com/entry/CentOS-%EA%B0%95%EC%A2%8C-PART-2-6-NFS-%EC%84%9C%EB%B2%84-%EA%B5%AC%EC%B6%95%EA%B3%BC-%EC%9A%B4%EC%98%81


Web Socket

https://techblog.woowahan.com/5268/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment