본문 바로가기

분류 전체보기199

[Spring Docs] Transaction Management #2 공식문서로 트랜잭션을 배워볼까요..?  이번글은 공식 문서에서 소개하는 Transaction Management에 대해 정리했습니다.범위 : Declarative Transaction Management( Settings) ~ Using @ Transactional  Settings This section summarizes the various transactional settings that you can specify by using the  tag. The default  settings are:이 섹션은 tx:advice/ 태그를 사용하여 지정할 수 있는 다양한 트랜잭션 설정을 요약합니다. 기본 tx:advice/ 설정은 다음과 같습니다:The propagation setting is REQUI.. 2025. 3. 18.
[Spring Docs] DispatcherServlet #3 공식문서는 Dispatcher Servlet에 대해서 뭐라고 할까요? 이번글은 공식 문서에서 소개하는 DispatchServlet에 대해 정리했습니다.정리 범위 : Locale ~ Logging LocaleMost parts of Spring’s architecture support internationalization, as the Spring web MVC framework does. DispatcherServlet lets you automatically resolve messages by using the client’s locale. This is done with LocaleResolver objects. Spring의 대부분의 아키텍처 구성 요소는 Spring 웹 MVC 프레임워크와 마찬가지.. 2025. 3. 17.
Garbage Collector #2 이번 글은 Garbage Collector의 Garbage Collector Implementation, Factors Affecting Garbage Collection Performance에 대해 정리했습니다. #3. Garbage Collector ImplementationJava SE 플랫폼의 강점 중 하나는 메모리 할당(memory allocation)과 가비지 컬렉션(garbage collection)의 복잡성을 개발자로부터 감춰 준다는 점입니다.그러나, 가비지 컬렉션이 주요 병목(bottleneck)이 될 경우,그 구현(implementation)의 몇 가지 측면을 이해하는 것이 유용할 수 있습니다. 가비지 컬렉터는 애플리케이션이 객체를 사용하는 방식에 대해 특정한 가정을(assumption.. 2025. 3. 17.
[Spring Docs] DispatcherServlet #2 공식문서는 Dispatcher Servlet에 대해서 뭐라고 할까요? 이번글은 공식 문서에서 소개하는 DispatchServlet에 대해 정리했습니다.정리 범위 : Processing ~ view Resolution ProcessingThe DispatcherServlet processes requests as follows:DispatcherServlet은 요청을 다음과 같이 처리합니다: The WebApplicationContext is searched for and bound in the request as an attribute that the controller and other elements in the process can use. It is bound by default under the.. 2025. 3. 16.
[Spring Docs] DispatchServlet #1 공식문서는 Dispatcher Servlet에 대해서 뭐라고 할까요?  이번글은 공식 문서에서 소개하는 DispatchServlet에 대해 정리했습니다.정리 범위 : Context Hierarchy ~ Servlet Config DispatcherServlet Spring MVC, as many other web frameworks, is designed around the front controller pattern where a central Servlet, the DispatcherServlet, provides a shared algorithm for request processing, while actual work is performed by configurable delegate compon.. 2025. 3. 15.
[Spring Docs] Transaction Propagation 공식문서는 트랜잭션 전파에 대해서 뭐라고 할까요?  이번글은 공식 문서에서 소개하는 트랜잭션 전파에 대해 정리했습니다. Transaction PropagationThis section describes some semantics of transaction propagation in Spring. Note that this section is not a proper introduction to transaction propagation. Rather, it details some of the semantics regarding transaction propagation in Spring. 이 섹션에서는 Spring에서의 트랜잭션 전파(transaction propagation)에 대한 몇 가지 의미론(se.. 2025. 3. 14.
[개념 정리] 세그먼트 트리 세그먼트 트리가 뭘까요?   배열을 [0,1,2,3,4]라고 가정합니다.init() 메서드 과정public static long init(int start, int end, int node) { if(start == end) { return tree[node] = arr[start]; } int mid = (start + end) / 2; return tree[node] = init(start, mid, node * 2) + init(mid + 1, end, node * 2 + 1);} 1. 재귀 호출을 통해서 리프 노드까지 깊이 우선 탐색을 진행합니다.후위 순회를 통해서 리프 노드에 배열의 값을 저장하고, 부모 노드로 올라가면서 자식 노드들의 합을 구하는 과정입니다. .. 2025. 3. 13.
빈 후처리 프록시 팩토리를 사용하는 방법보다더 좋은 방법은 없을까? 이번글은 빈 후처리기에 대해 정리했습니다.참고 강의 : 김영한의 스프링 핵심 원리 - 고급 편 프록시 팩토리로 프록시 객체를 생성하는 방식은 어떤 문제가 존재할까요? 설정 파일이 너무 많아집니다. 예를 들어 스프링 빈이 100개가 존재하는 경우, 프록시를 통해 부가 기능을 적용하기 위해선 100개의 동적 프록시 생성 코드를 만들어야 합니다.스프링은 컴포넌트 스캔을 사용해서 실제 객체를 스프링 빈으로 등록합니다. 동적으로 생성된 프록시 객체는 컴포넌트 스캔을 통해서 등록을 할 수 없기 때문에, 프록시 객체를 직접 빈으로 등록해야 합니다. 예를 들어, 등록해야 할 프록시 객체가 100개가 존재한다면, 수동으로 빈으로 등록해야 합니다. 스프링이 빈을 등.. 2025. 3. 13.
[개념 정리] 최단 거리 최단 거리는 어떻게 구할 수 있을까요? 이 글은 큰돌의 터전님의 강의인 10주 완성 C++ 코딩테스트 알고리즘 개념 교안을 참고하여 작성했습니다. 최단 거리최단거리 알고리즘은 그래프 상의 두 정점 사이의 거리가 최소가 되는 경로를 찾는 알고리즘입니다. BFS를 사용해도 최단 거리를 구할 수 있는거 아닌가요? BFS는 가중치가 같은 그래프에서 최단 거리 알고리즘으로 사용할 수 있습니다.가중치가 다를 경우엔 최단거리 알고리즘을 사용해야 합니다. 가중치가 다른 경우에 BFS로 최단거리를 찾을 수 없는 예시는 다음과 같습니다.A → C로 이동할 때, BFS로 하는 경우 14가 나오게 됩니다.하지만, 최단 거리는 A → B → D → C로 6이 나와야 합니다. 최단거리 알고리즘엔 어떤게 있을까요? 코딩테스트에선 .. 2025. 3. 12.