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 |
31 |
Tags
- SpringMVC
- awssecretsmanagerpropertysources
- aws secretmanager
- micrometer tracing
- java
- Sleuth
- kotlin
- asynccustomautoconfiguration
- jpa
- ResponseBody
- spring
- CompletableFuture
- elasticsearch
- traceasynccustomautoconfiguration
- Spring JPA
- traceId
- spring MVC
- asyncconfigurer
- map
- java.util.list
- wire type
- grpc
- java lambda
- @FunctionalInterface
- HashMap
- list
- DeferredImportSelector
- java list
- EnableWebMvc
- Spring Boot
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