일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Java
- 메모이제이션
- 스프링 시큐리티
- 도커
- 완전 탐색
- 구간 트리
- 구현
- dp
- spring boot
- Logback
- 달팽이
- 게이트웨이
- 트리
- BFS
- 비트마스킹
- Spring Cloud Config
- Gradle
- 다익스트라
- 스택
- 백트래킹
- 주울
- 이분 탐색
- 서비스 디스커버리
- Zuul
- 이분 매칭
- ZuulFilter
- 플로이드 와샬
- 유레카
- docker-compose
- spring cloud
- Today
- Total
목록테스트 (2)
Hello, Freakin world!
간단하게 몇 개의 url 접근에 필요한 권한을 설정하고 mock 테스트를 작성해보자. 아래와 같이 url 권한을 설정, 요청에 csrf 토큰을 추가하도록 설정했다. csrf 설정을 하게 되면 위험할 수 있는 요청(POST, DELETE, PUT)의 경우 반드시 csrf 토큰을 요청에 포함해야 된다. WebSecurityConfig import org.springframework.http.HttpMethod; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.bu..

다음의 컨트롤러 계층의 메서드가 있다고 가정합니다. @ToString @NoArgsConstructor @Getter public class ItemCreateDto { @NotNull private String name; @NotNull private Integer price; @NotNull private Integer stockQuantity; private List details; } @PostMapping("/items") public String create(@RequestBody ItemCreateDto createDto) { System.out.println(createDto); return "created"; } 웹 POST 요청 바디의 JSON객체가 ItemCreateDto에 제대로 바..