내용으로 건너뛰기
권남
사용자 도구
로그인
사이트 도구
검색
도구
문서 보기
이전 판
역링크
최근 바뀜
미디어 관리자
사이트맵
로그인
>
최근 바뀜
미디어 관리자
사이트맵
추적:
springframework:meta_annotation
이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요.
====== SpringFramework Meta Annotation ====== * [[:springframework|Spring Framework]] 4 버전부터 메타 어노테이션에서 alias 기능 생김 ===== 예: @Transactional override ===== * DataSource와 TransactionManager가 여러개일 때 각 트랜잭션 매니저마다 별도의 ''@Transactional''을 만들어주고 싶을 때 <code java> @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented @Transactional("myDbTransactionManager") public @interface MyDbTransactional { @AliasFor(annotation = Transactional.class) Propagation propagation() default Propagation.REQUIRED; @AliasFor(annotation = Transactional.class) Isolation isolation() default Isolation.DEFAULT; @AliasFor(annotation = Transactional.class) int timeout() default -1; @AliasFor(annotation = Transactional.class) boolean readOnly() default false; ... } </code> ===== 참조 ===== * [[https://github.com/spring-projects/spring-framework/wiki/spring-annotation-programming-model|Spring Annotation Programming Model]] * [[https://www.logicbig.com/tutorials/spring-framework/spring-web-mvc/meta-annotation.html|Spring MVC- What are meta-annotations? How to create a custom annotation with meta-annotations?]] * [[https://www.logicbig.com/tutorials/spring-framework/spring-core/alias-for-annotation.html|@AliasFor annotation Examples]]
springframework/meta_annotation.txt
· 마지막으로 수정됨: 2019/01/11 19:50 저자
kwon37xi
문서 도구
문서 보기
이전 판
역링크
맨 위로