[Error] 회원가입시 생년월일 받아올 때 Failed to convert value of type 'java.lang.String' to required type 'java.util.Date' 문제

2022. 7. 30. 21:07·Trouble Shooting(Error)
728x90
반응형

Member VO에 Date birth를 선언해주고

jsp input 태그에 type을 Date나 text로 받아오는데 자꾸 400 에러가 발생했다..

 

원인은 자료형이 맞지 않아서 계속 발생..

 

Member 인터페이스에 @DateTimeFormat을 추가해줬더니 해결이 되었다.

 

DTO나 VO 객체를 파라미터로 사용하지 않을 거라면 String으로 받아와서 형변환을 해주어도 된다!

 

회원가입부터 이렇게 막힐 줄이야...ㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠ

728x90
반응형

'Trouble Shooting(Error)' 카테고리의 다른 글

[Error] 로그인 시 에러 발생 - org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException:  (0) 2022.08.01
[Error] 스프링 시큐리티 관련 회원가입시 한글 깨짐 문제  (0) 2022.08.01
[Java_Error] Exception in thread "main" java.lang.IllegalStateException: Cannot load configuration class  (0) 2022.07.12
[Java_Error] Exception in thread "main" org.springframework.beans.factory.BeanCreationException  (0) 2022.07.12
[Java_Error] exception in thread "main" java.lang.noclassdeffounderror: org/apache/commons/logging/logfactory  (0) 2022.07.12
'Trouble Shooting(Error)' 카테고리의 다른 글
  • [Error] 로그인 시 에러 발생 - org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException:
  • [Error] 스프링 시큐리티 관련 회원가입시 한글 깨짐 문제
  • [Java_Error] Exception in thread "main" java.lang.IllegalStateException: Cannot load configuration class
  • [Java_Error] Exception in thread "main" org.springframework.beans.factory.BeanCreationException
야리니
야리니
오늘보다 내일 더 성장하는 개발자가 되기 위한 야리니 블로그입니다 :)
    반응형
    250x250
  • 야리니
    야리니의 step by step
    야리니
  • 링크

    • GitHub
    • Linkedin
  • 전체
    오늘
    어제
    • 분류 전체보기 (478)
      • TIL (379)
        • Java (97)
        • Kotlin (28)
        • JPA (16)
        • Spring (37)
        • Oracle (22)
        • JDBC (7)
        • Web(HTML, CSS, JS, jQuery) (90)
        • View Template (31)
        • AWS (7)
        • HTTP (7)
        • CS (5)
        • Linux, Unix (2)
        • Python (20)
      • Trouble Shooting(Error) (37)
      • Algorithm (15)
      • Git,GitHub (8)
      • Diary (24)
      • 독서 (9)
      • Etc (6)
        • Mac (1)
        • 학원준비과정 (2)
  • 블로그 메뉴

    • 방명록
    • 태그
  • 공지사항

    • 안녕하세요 :)
  • 인기 글

  • 태그

    java기초
    Kotlin
    java
    코틀린
    백엔드 개발자
    쌍용교육센터
    CSS
    국비지원학원
    oracle
    HTML
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.2
야리니
[Error] 회원가입시 생년월일 받아올 때 Failed to convert value of type 'java.lang.String' to required type 'java.util.Date' 문제
상단으로

티스토리툴바