-
|
이번 강의 자체에는 별로 질문할 거리가 떠오르지 않아서 개인적으로 궁금한 것 질문 남깁니다 ! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
커스텀 애노테이션은 잘 사용하는지 잘 모르겠습니다. 아마도 큰 기업이면 문서로 정리 잘해서 쓰고 있지 않을까 싶기도합니다. |
Beta Was this translation helpful? Give feedback.
-
|
저희 스프링 핵심 원리에서 사용했던 부분이 있습니다. package hello.core.scan.filter;
import java.lang.annotation.*;
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface MyIncludeComponent {
}package hello.core.scan.filter;
import java.lang.annotation.*;
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface MyExcludeComponent {
}Meta Annotation (@target, @retention)
@target은 Java Compiler가 annotation이 어디에 적용될지 결정하기 위해 사용한다.
@retention은 Annotation이 실제로 적용되고 유지되는 범위를 의미한다.
리플렉션(reflection)
출처: https://jeongkyun-it.tistory.com/225 자세히 보고 싶다면 이 글도 도움이 될 거 같습니다. |
Beta Was this translation helpful? Give feedback.
저희 스프링 핵심 원리에서 사용했던 부분이 있습니다.
강의 정보는 #6. 컴포넌트 스캔 - 필터 부분에 있습니다.
Meta Annotation (@target, @retention)
@target은 Java Compiler가 annotation이 어디에 적용될지 결정하기 위해 사용한다.
@retention은 Annotation이 실제로 적용되고 유지되는 범위…