completablefuture2 IntelliJ 생산성: 라이브 템플릿 10개 IntelliJ 생산성: 라이브 템플릿 10개반복해서 타이핑하는 코드가 있다면 Live Template로 치환하세요.Settings → Editor → Live Templates에서 등록하고 Context를 Java또는 Java Statement로 지정하면, 축약어만 입력해 몇 초 만에 표준 형태를 완성할 수 있습니다.아래 10개는 현업에서 바로 쓰는 템플릿과 변수 예시입니다.사용 팁$END$: 커서 최종 위치$SELECTION$: 선택 영역을 템플릿에 삽입함수 매크로: methodName(), className(), date()1) gwt – Given/When/Then 테스트 스켈레톤@Test @DisplayName("$DESC$")void $NAME$() { // Given $END$ // W.. 2025. 10. 1. CompletableFuture allOf/anyOf로 외부 API 병렬화 CompletableFuture allOf/anyOf로 외부 API 병렬화외부 API를 여러 개 호출할 때 CompletableFuture는 단순한 쓰레드 풀보다 표현력이 좋습니다.이 글은 allOf로 “모두 끝나면” 합치기, anyOf로 “가장 빠른 것” 받기,그리고 타임아웃/예외/취소까지 한 번에 다룹니다.준비: 전용 ExecutorExecutorService httpPool = Executors.newFixedThreadPool(64, r -> { Thread t = new Thread(r, "http-" + System.nanoTime()); t.setDaemon(true); return t;});1) allOf: 모두 끝난 뒤 결과 모으기CompletableFuture u = supp.. 2025. 9. 29. 이전 1 다음