일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- Spring Batch
- preventdefault
- UsernamePasswordAuthenticationFilter
- OpenStack
- vue
- SWAGGER
- vuejs
- SpringBoot
- cloud native
- Filter
- MFA
- 리액트
- JavaScript
- Spring REST Docs
- Reduxpender
- AuthenticatoinProvide
- stopPropogation
- MSA
- SpringRESTDocs
- Flyway
- REACT
- Crawling
- Pender
- tasklet
- axios
- cheerio
- openapi3
- gradle
- Spring Security
- T-OTP
- Today
- Total
목록SpringRESTDocs (2)
Miracle Morning, LHWN

# 앞서 만들어주었던 API 에 대한 테스트 코드를 작성한다. 아래와 같이 /api/user/{id} 요청에 대한 응답 명세를 작성해주고, 실행하면 generated-snippets 하위 폴더에 각 요청/응답에 대한 snippet 들이 생성된다. // test/java/com/spring/SpringRESTDocsPractice/UserApiDocumentation.java @RunWith(SpringRunner.class) @SpringBootTest public class UserApiDocumentation { @Rule public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation(); @Autowired pr..

사전 세팅 및 개념 정리 # 먼저 Spring initializr 에서 기본 세팅을 한 후 프로젝트를 생성한다. Spring Web : API 를 만들기 위해 설정 Spring Data JPA : 데이터베이스에서 CRUD 를 하기 위한 설정 (ORM 도구) Validation : Bean 의 유효성 검사를 위한 설정 Spring REST Docs Lombok : 로그를 좀 더 편하게 보기 위한 설정 MySQL Driver : MySQL 를 연동하기 위한 설정 # 문서화를 위한 API 생성 : POST /api/user 조회 : GET /api/user/{id} 수정 : PUT /api/user 삭제 : DELETE /api/user/{id} # 실습 순서 프로젝트 생성 실습에 필요한 테스트 API 코..