Notice
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- micrometer tracing
- map
- wire type
- ResponseBody
- EnableWebMvc
- traceasynccustomautoconfiguration
- list
- elasticsearch
- aws secretmanager
- traceId
- CompletableFuture
- spring
- kotlin
- DeferredImportSelector
- java lambda
- jpa
- Spring JPA
- @FunctionalInterface
- asyncconfigurer
- spring MVC
- Sleuth
- java
- SpringMVC
- grpc
- java list
- asynccustomautoconfiguration
- Spring Boot
- awssecretsmanagerpropertysources
- java.util.list
- HashMap
Archives
- Today
- Total
목록Validated (1)
du.study기록공간

이번에는 모델의 검증작업, 모델 바인딩 과정에서 발생되는 에러의 결과를 저장해주는 BindingResult에 대해서 기록하려 합니다. 만약 이런 해당사항의 컨트롤러,도메인이 있다고 가정하겠습니다. @GetMapping("/success-test") @ResponseBody public String errorBindTest(@Validated TestDomain domain , BindingResult bindingResult){ if(bindingResult.hasErrors()){ return bindingResult.getAllErrors().get(0).getDefaultMessage(); } return "success"; } @GetMapping("/error-test") @ResponseBod..
스프링
2019. 11. 12. 01:22