Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- multi module
- @MockBean
- @Valid
- Service Locator 패턴
- JPA
- springboot
- Proxy Patter
- @SpyBean
- 트랜잭션
- Firebase
- Item04
- Effetive Java
- Effective Java
- java
- 플라이웨이트
- SQL 삽입 공격
- @ControllerAdvice
- NotEmpty
- Connection Pool
- deleteById
- NotBlank
- 데이터베이스
- 디자인 패턴
- Service Locator
- Spring Boot
- db
- FCM
- Web
- restTemplate
- 이펙티브 자바
Archives
- Today
- Total
목록Error Handling (1)
NoTimeForDawdling
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/bdx0ND/btq3Cz04v5T/QJHMYx4R9hSwjOiUsF2nP1/img.png)
오늘은 @ControllerAdvice를 이용해서 @Valid시 발생하는 에러를 처리해보겠습니다. @Valid 사용법은 여기에 자세히 나와있습니다. @ControllerAdvice란? @ControllerAdvice는 @Controller 전역에서 발생할 수 있는 예외를 잡아 처리해주는 애너테이션입니다. 자 그럼 이제 코드를 통해 알아보겠습니다. ExceptionController.class @RestControllerAdvice public class ExceptionController { @ExceptionHandler(MethodArgumentNotValidException.class) public ResponseEntity handelValidationExceptions(MethodArgument..
SpringBoot
2021. 4. 28. 16:35