You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
공통 관심 사항 (cross-cutting concern) vs 핵심 관심 사항 (core concern)
회원 가입 시간, 회원 조회 시간을 측정하고 싶을 때
MemberService 회원 조회 시간 측정 추가
publicLongjoin(Membermember) {
//같은 이름이 있는 중복 회원 x//null이 아니라 어떤 값이 있으면 로직이 동작한다. (Optional이라 가능한 일이다.)longstart = System.currentTimeMillis();
try {
validateDuplicateMember(member); //중복 회원 검증memberRepository.save(member);
returnmember.getId();
} finally {
longfinish = System.currentTimeMillis();
longtimeMs = finish - start;
System.out.println("join = " + timeMs + "ms");
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
AOP가 필요한 상황
AOP 적용 (Aspect Oriented Programming)
스프링의 AOP 동작 방식 설명
Beta Was this translation helpful? Give feedback.
All reactions