일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- kotlin
- transaction
- JDBC
- http
- Thymeleaf
- db
- 스프링 핵심 원리
- java
- SpringBoot
- 인프런
- springdatajpa
- Proxy
- 백준
- 알고리즘
- JPQL
- 스프링 핵심 기능
- AOP
- 스프링
- jpa
- Greedy
- spring
- 김영한
- Servlet
- 자바
- Android
- 그리디
- Spring Boot
- Exception
- QueryDSL
- pointcut
- Today
- Total
목록Annotaion (4)
개발자되기 프로젝트
앞선 글과 같이 생성일자의 경우 여기저기서 많이 사용한다. 매 번 만들어서 적용하기는 너무 불편하다. custom annotaion을 만들어서 적용을 해보자. 1. annotaion import com.example.kotlinspring.validator.StringFormatDateTimeValidator import javax.validation.Constraint import javax.validation.Payload import kotlin.reflect.KClass @Constraint(validatedBy = [StringFormatDateTimeValidator::class]) //어떤 validator? @Target( //적용할 대상 AnnotationTarget.FIELD, Anno..
@Trace 가 메서드에 붙어 있으면 호출 정보가 출력되도록 하자. 1. @Trace @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface Trace { } 2. TraceAspect @Slf4j @Aspect public class TraceAspect { @Before("@annotation(hello.aop.exam.annotation.Trace)") public void doTrace(JoinPoint joinPoint){ Object[] args = joinPoint.getArgs(); log.info("[trace] {}, args={}", joinPoint.getSignature(), args); }..
RequestMapping Handler Adapter 구조 HTTP 메시지 컨버터는 SpringMVC 어디 쯤? 에서 사용됨....? 1. SpringMVC 구조 @RequestMapping을 처리하는 핸들러 Adapter인 RequestMappingHandlerAdapter에서 처리함. 2. RequestMappingHandlerAdapter 동작.. bsh-developer.tistory.com 1. @Login annotation을 직접 만들자? 기존에는 @SessionAttribute()를 Member에 붙여서 Member와 관련있는 Session을 편하게 사용하였다. @SessionAttribute()는 request에서 session을 꺼내주고 쿠키까지 찾아준다. 충분히 편리하다. // @G..
흠 근데 @Qualifier를 그냥 사용하면 문제가 있음 @Qualifier("mainDiscountPolicy")라고 지정했다 해보자. 타입 체크 어떻게함?????????? annotaion을 만들어서 해결할 수 있음. 1. annotaion 생성 우리가 만든 annotaion에 @Qualifier를 적용해 주자. 즉, 우리가 만든 annotaion을 사용하면 @Qualifier가 매칭이 된다. @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE, ElementType.ANNOTATION_TYPE}) @Retention(RetentionPolicy.RUNTIME) @Inherited @Documen..