본문 바로가기

du.study기록공간

검색하기
du.study기록공간
프로필사진 du.study

  • 분류 전체보기 (70)
    • 자바 (23)
    • 스프링 (31)
    • Tool (2)
    • presto (1)
    • DB (3)
    • JPA (5)
    • nginx (1)
    • kotlin (2)
    • 기타 잡다한 지식 (2)
Guestbook
Notice
«   2025/05   »
일 월 화 수 목 금 토
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
  • Spring Boot
  • awssecretsmanagerpropertysources
  • asynccustomautoconfiguration
  • @FunctionalInterface
  • DeferredImportSelector
  • java
  • micrometer tracing
  • wire type
  • traceasynccustomautoconfiguration
  • HashMap
  • Spring JPA
  • SpringMVC
  • java lambda
  • spring MVC
  • asyncconfigurer
  • traceId
  • CompletableFuture
  • list
  • EnableWebMvc
  • jpa
  • aws secretmanager
  • elasticsearch
  • grpc
  • ResponseBody
  • java list
  • Sleuth
  • java.util.list
  • map
  • spring
  • kotlin
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록resolveArgument (1)

du.study기록공간

[Spring MVC] @Validated(@Valid) and BindingResult

이번에는 모델의 검증작업, 모델 바인딩 과정에서 발생되는 에러의 결과를 저장해주는 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
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바