Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AOP 프록시의 자동구현과 수동구현 #14

Open
ksi05503 opened this issue Mar 29, 2022 · 0 comments
Open

AOP 프록시의 자동구현과 수동구현 #14

ksi05503 opened this issue Mar 29, 2022 · 0 comments

Comments

@ksi05503
Copy link
Contributor

스프링에서는 jdk 다이나믹 프록시 방식 혹은 cglib 라이브러리를 사용하여 자동으로 aop 를 구현해주는데, 이 자동화가 된 이유가있습니다.

수동으로 Service 인터페이스를 상속하는 프록시 클래스를 만들어 사용하게되면 다음과같은 문제들이 있습니다.

  • 불필요하게 같은 인터페이스에 두개의 구현체 -> 불필요한 빈등록 (여러 빈 관리)
  • 빈이 2개 등록되어있어 DI 시에 문제발생가능

이와 관련하여 예제코드와 설명이 잘 적힌 블로그가 있어서 참고하면 좋을것같습니다.

https://mangkyu.tistory.com/175?category=761302

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant