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
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.
인터페이스 기반 프록시 - 적용
V1 프록시 의존 관계 추가
V1 프록시 런타임 객체 의존 관계
OrderRepositoryInterfaceProxy
OrderServiceInterfaceProxy
OrderControllerInterfaceProxy
OrderControllerInterfaceProxy
V1 프록시 런타임 객체 의존 관계 설정
대상 객체인 OrderServiceV1Impl 을 가지고 있음
런타임 객체 의존 관계
정리
추가된 요구사항
원본 코드를 전혀 수정하지 않고, 로그 추적기를 적용해라.특정 메서드는 로그를 출력하지 않는 기능보안상 일부는 로그를 출력하면 안된다.다음과 같은 다양한 케이스에 적용할 수 있어야 한다.
v1 - 인터페이스가 있는 구현 클래스에 적용v2 - 인터페이스가 없는 구체 클래스에 적용
v3 - 컴포넌트 스캔 대상에 기능 적용
프록시와 DI 덕분에 원본 코드를 전혀 수정하지 않고, 로그 추적기를 도입할 수 있었음, 물론 너무 많은 프록시 클래스를 만들어야 하는 단점이 있기는 함
이 부분은 나중에 해결하기로 하고, 우선은 v2 - 인터페이스가 없는 구체 클래스에 프록시를 어떻게 적용할 수 있는지 알아봄
All reactions