-
카테고리
-
세부 분야
백엔드
-
해결 여부
해결됨
@Retention 질문
21.03.13 21:44 작성 조회수 142
0
안녕하세요. 항상 잘 듣고 있습니다.
어노테이션은 계속 상속되는게 아닌가요?
그러니까 @RequestMapping 어노테이션도
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Mapping
public @interface RequestMapping {
String name() default "";
위 코드처럼 @Retention 이 지정되어 있으므로
@RequestMapping(method = RequestMethod.GET)
public @interface GetHelloMapping {
위 같은 커스텀 어노테이션을 사용해도 자동으로 @Retention이 적용되야 하는게 아닌가 궁금합니다.
답변을 작성해보세요.
1
답변 1