Notice
Recent Posts
Recent Comments
Link
«   2025/08   »
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 more
Archives
Today
Total
관리 메뉴

jeongwon

[Error] 400 – 잘못된 요청 본문

Error log

[Error] 400 – 잘못된 요청

jeongwon_ 2022. 10. 24. 06:20

오류:

브라우저

클라이언트 오류로서 인지된 어떤 문제로 인하여, 서버가 해당 요청을 처리할 수 없거나, 처리하지 않을 것입니다. (예: 잘못된 요청 문법, 유효하지 않은 요청 메시지 framing, 또는 신뢰할 수 없는 요청 라우팅).

 

콘솔

org.springframework.validation.BeanPropertyBindingResult: 2 errors<EOL>Field error in object 'exhibitionDTO' on field 'end_date': rejected value [2022-12-30]; codes [typeMismatch.exhibitionDTO.end_date,typeMismatch.java.util.Date,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [exhibitionDTO.end_date,end_date]; arguments []; default message [end_date]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'end_date'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [java.util.Date] for value '2022-12-30'; nested exception is java.lang.IllegalArgumentException]<EOL>Field error in object 'exhibitionDTO' on field 'start_date': rejected value [2022-10-01]; codes [typeMismatch.exhibitionDTO.start_date,typeMismatch.start_date,typeMismatch.java.util.Date,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [exhibitionDTO.start_date,start_date]; arguments []; default message [start_date]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'start_date'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [java.util.Date] for value '2022-10-01'; nested exception is java.lang.IllegalArgumentException]]

 

 

해결:

input 태그 내의 name 이 end_date 인 부분에서 따옴표가 빠졌다. name=end_date  => name="end_date" 로 고침.