일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- cors
- 브루트포스
- 스프링 부트
- OAuth2
- HttpMessageConverters
- @Profile
- application.properties
- rest api
- WebApplication Type
- JPA
- @ConfigurationProperties
- EnableAutoConfiguration
- Application Argument
- JsonSerializer
- 백준
- 외부설정
- webjar
- 리소스핸들러
- 정적 리소스
- 다익스트라
- HATEOAS
- 백트래킹
- 리소스 서버
- 스프링부트
- 백기선
- Application Runner
- 알고리즘
- AuthenticationPrincipal
- Spring Security
- Application Event
- Today
- Total
목록전체 글 (114)
아카이브

1. HashTable은 thread-safe 하다. HashMap은 그렇지 않다. - thread-safe란? 멀티스레드 환경에서 동시 접근이 발생하는 경우에도 값의 내용이나 프로그램 실행에 문제가 없음을 보장하는 것이다. - 각 스레드에서 프로그램 실행 결과의 올바름을 보장한다. - thread-safe는 synchronized cost를 발생시키므로, 단일 스레드 환경에서는 HashMap의 성능이 더 좋다. 2. HashTable의 key는 not-null이고, HashMap은 하나의 null key와 다수의 null value가 허용된다. - HashTable의 key는 hashCode(), equals() 에서 사용되기 때문에 null을 허용하지 않는다.
Index Handler는 다른 리소스에 대한 링크를 제공한다.(EventController 및 문서화) @RestController public class IndexController { @GetMapping("/api") public RepresentationModel index() { RepresentationModel index = new RepresentationModel(); index.add(linkTo(EventController.class).withRel("events")); return index; } } ErrorResource 작성 : 에러 발생 시 Index 링크 제공 public class ErrorsResource extends EntityModel { public Errors..
애플리케이션 설정과 테스트 설정 중복 어떻게 줄일 것인가? - @SpringBootTest 통합 테스트 시 모든 빈들을 등록하게 된다. 이때 Postgresql을 사용한다. - @WebMvcTest와 같은 Mock Test의 경우는 기본적으로 H2 인메모리 DB를 사용하고, mock bean들을 등록한다. - test/resources에 test용 application.properties를 생성하고 활용하면, properties 우선순위로 인해 main의 같은 파일을 overriding 해서 같은 설정이 아니라면 값이 상실되기에 중복 코드의 문제점이 존재한다. Profile과 @ActiveProfiles 로 중복 문제를 해결 - 테스트 클래스에 @ActiveProfiles("test") 기입하여, mai..