강의

멘토링

커뮤니티

Inflearn Community Q&A

No author

This post's author information has been deleted.

Create your first server with Java and Spring Boot, from development to deployment, easily! [All-in-one server development package]

Lecture 13. Using Databases in Spring

글동록하는부분에서 등록을 하고나면 나이부분에 값이 00세라고들어가네요 이유가뭘까요??

Written on

·

310

0

객채셍성하고 등록화면부분올려드렷어요

javaspringawsmysqlspring-bootjpa

Answer 2

0

나이에 문자를 입력해주 오류가 난거네요

lannstark님의 프로필 이미지
lannstark
Instructor

아 그렇군요~ 🙂 찾으셨다니 다행입니다~ 👍

0

lannstark님의 프로필 이미지
lannstark
Instructor

안녕하세요! 😊 "글등록 하는 부분"이라고 말씀해주신게 실제로는 "유저 등록"인 것 같아요! 보여주신 코드가 유저 관련 코드라서요~

기본적으로 이름에 0이 들어가는 이유는, DTO로 전달된 age 에 null이 들어 있을 경우, 나이를 별도로 설정해주지 않았다고 간주되어 기본값인 0이 들어가기 때문입니다!

답변이 도움이 되었으면 좋겠습니다. 감사합니다! 🙏

No author

This post's author information has been deleted.

Ask a question