일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Proxy
- kotlin
- JDBC
- Exception
- SpringBoot
- 스프링 핵심 기능
- Spring Boot
- Android
- Servlet
- jpa
- 그리디
- transaction
- Thymeleaf
- spring
- 자바
- pointcut
- QueryDSL
- JPQL
- db
- Greedy
- 스프링
- 인프런
- springdatajpa
- 알고리즘
- AOP
- http
- java
- 스프링 핵심 원리
- 김영한
- 백준
- Today
- Total
목록spring MVC (2)
개발자되기 프로젝트
스프링 인터셉터는 서블릿 필터와 같이 웹과 관련된 공통 관심 사항을 효과적으로 해결할 수 있는 기술 해당 기능을 Servlet이 제공하면 ServletFilter, Spring MVC가 제공하는 것은 Spring Iterceptor 웹과 관련된 공통 관심 사항을 처리하지만, 적용되는 순서와 범위, 그리고 사용방법이 다름. 1. Spring Interceptor 흐름 HTTP 요청 -> WAS -> Filter -> DispatcherServlet -> Spring Interceptor -> Controller Spring Interceptor는 Dispatchet Servlet과 컨트롤러 사이에서 컨트롤러 호출 직전에 호출 된다. Spring Interceptor는 Spring MVC가 제공하는 기능이기..
1. Spring적용을 해보자. 기존에 등록한 ItemValidator를 제거! 어? 그래도 검증기 돌아간다.? 2. Spring MVC는 어떻게 Bean Validation 사용? Spring Boot가 spring-boot-starter-validation 라이브러리를 넣으면 자동으로 Bean Validator를 인지하고 스프링에 통합함. Spring Boot는 자동으로 글로벌 Validator를 등록한다. LocalValidatorFactoryBean 을 글로벌 Validator로 등록 이 Validator는 @NotNull 같은 @Annotation을 보고 검증을 수행 글로벌 Validator가 적용되어 있기 때문에, Validator를 사용하기 위해서는 원하는 target 앞에 @Valid , ..