일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- java list
- awssecretsmanagerpropertysources
- asynccustomautoconfiguration
- java.util.list
- java lambda
- Sleuth
- DeferredImportSelector
- SpringMVC
- spring
- list
- micrometer tracing
- traceId
- asyncconfigurer
- Spring Boot
- HashMap
- ResponseBody
- elasticsearch
- EnableWebMvc
- @FunctionalInterface
- b3-propagation
- kotlin
- aws secretmanager
- traceasynccustomautoconfiguration
- map
- Spring JPA
- jpa
- java
- spring3 spring2 traceid
- CompletableFuture
- spring MVC
- Today
- Total
목록java (14)
du.study기록공간
최근 알고리즘 문제를 한개씩 풀다보면 풀다보면 자주 최대 힙, 최소 힙을 구현하여 사용해야 되는 경우가 생깁니다. (예를 들면 위상정렬, 최대값 뽑아내기 등) 자바에서는 현재 PriorityQueue를 이용하여 최대 힙, 최소 힙을 간단하게 사용할 수 있도록 제공해주고 있습니다. 다음은 최대 힙, 최소 힙에 대한 간단한 예시입니다. public void init() throws IOException{ PriorityQueue minHeap = new PriorityQueue(); System.out.println("최소 힙"); runHeapTest(minHeap); PriorityQueue maxHeap = new PriorityQueue(Collections.reverseOrder()); System..
이번에는 핸들러 인터셉터에 대해서 기록하려 합니다. Spring에서는 Interceptor라는 기능을 제공하는데, 이 Interceptor를 통해서 dispatcher로 들어온 요청들을 가로챈다음 특정 작업을 진행할 수 있게 도아줍니다. 이를 통해서 요청의 전,후 처리가 가능하며, 필자는 현재 로그인, 각 api별 권한확인 등을 위해서 Interceptor를 사용하고 있습니다. Interceptor 를 사용하려면 Class에 implements HandlerInterceptor 를 지정해준 후, 관련 메서드에 기능을 구현해야 합니다. public class FirstIntercepter implements HandlerInterceptor { @Override public boolean preHandle..
최근 스프링을 사용하면서 web.xml에 설정을 하고 코딩을 하는경우가 아에 없어졌다. 사실 스프링부트가 상용화되는 요즘에 web.xml이 왠말인가... 당장 내가 쓰는 프로젝트의 모든 빈을 web.xml에 등록한다 생각하니 상상만으로 충분히 끔찍하다. 이번엔 web.xml을 사용하지 않고 MVC를 사용하는 케이스를 기록하려 합니다. 먼저 Spring Project 생성을 위하여 Intellij 에서 maven project를 생성 후, spring, servlet등에 대한 정보를 넣어줬습니다. 4.0.0 do.spring testProject 1.0-SNAPSHOT war junit junit 4.11 test javax.servlet javax.servlet-api 4.0.1 provided org...
친구에게 갑자기 이 질문을 받게 되었다. Integer a1 = 127; Integer a2 = 127; a1 == a2 는 true일까? Integer b1 = 128; Integer b2 = 128; b1 == b2 는 true일까? 오브젝트 비교는 알겠는데.. 진짜 같은가에 대해선 대답을 못해서 우선 코드를 돌려보았다. class Test { public static void main(String[] args) { Integer a1 = 127; Integer a2 = 127; System.out.println(a1 == a2); // true Integer b1 = 128; Integer b2 = 128; System.out.println(b1 == b2); // false } } 결과가 왜이러는..