Home
My Technical Diary
Cancel

LeetCode - 620. Not Boring Movies

620. Not Boring Movies - Easy 문제 Table: Cinema +----------------+----------+ | Column Name | Type | +----------------+----------+ | id | int | | movie | varcha...

LeetCode - 1768. Merge Strings Alternately

1768. Merge Strings Alternately - Easy 문제 You are given two strings word1 and word2. Merge the strings by adding letters in alternating order, starting with word1. If a string is longer than th...

HackerRandk - Fraudulent Activity Notifications

Fraudulent Activity Notifications - Medium 문제 HackerLand National Bank has a simple policy for warning clients about possible fraudulent account activity. If the amount spent by a client on a p...

simpleDB - 메모리

SkipList 구현하고 있는 simpleDB 프로젝트는 distribute key value storage 로, 기본적으로는 LSM-tree 를 사용하여 storage를 구현했고, 분산처리를 위해 Raft 알고리즘을 구현한 프로젝트이다. 여기서 LSM-tree 기반 storage를 구현하던 중 L0에 해당하는 메모리 영역에 데이터를 저장하기 위한...

Spring Framework - AOP 주의사항

프록시와 내부 호출 문제 스프링은 프록시 방식의 AOP를 사용한다. 따라서 AOP를 적용하려면 항상 프록시를 통해서 대상 객체(Target)을 호출해야 한다. 이렇게 해야 프록시에서 먼저 어드바이스를 호출하고 이후 대상 객체를 호출한다. 만약 프록시를 거치지 않고 대상 객체를 직접 호출하게되면 AOP가 적용되지 않고 어드바이스도 호출되지 않는다. ...

Spring Framework - AOP 구현 예시

Retry AOP 구현 @Repository public class ExamRepository { private static int seq = 0; /** * 5번에 1번 실패하는 요청 */ @Trace @Retry(value = 4) public String save(String itemId) { seq++...

Spring Framework - 포인트컷

포인트컷 지시자 포인트컷 표현식은 AspectJ pointcut express 즉, AspectJ가 제공하는 포인트컷 표현식을 줄여서 말하는 것이다. 포인트컷 표현식은 execution과 같은 포인트컷 지시자(Pointcut Designator)로 시작한다. execution 메소드 실행 조인 포인트를 매칭 스...

Spring Framework - 스프링 AOP 구현

스프링 AOP 구현 기본 구현 스프링 AOP를 구현하는 일반적인 방법은 @Aspect를 사용하는 방법이다. @Slf4j @Aspect public class AspectV1 { // hello.aop.order 패키지와 하위 패키지 @Around("execution(* hello.aop.order..*(..))") public Obj...

Spring Framework - 스프링 AOP 개념

핵심 기능과 부가 기능 어플리케이션의 로직은 크게 핵심 기능과 부가 기능으로 나눌 수 있다. 핵심 기능 해당 객체가 제공하는 고유의 기능 예를 들면 OrderService의 핵심 기능인 주문 로직과 같은 경우 부가 기능 핵심 기능을 보조하기 위해 제공되는 기능 단독...

Spring Framework - 자동 프록시 생성기와 @Aspect

자동 프록시 생성기와 @Aspect 자동 프록시 생성기(AnnotationAwareAspectJAutoProxyCreator)는 Advisor를 자동으로 찾아와서 필요한 곳에 프록시를 생성하고 적용한다. 그리고 추가로 하나의 역할을 더 하는데, @Aspect를 찾아서 이것을 Advisor로 만드는 일이다. 즉, 자동 프록시 생성기는 크게 두가지 일...