강의

멘토링

커뮤니티

Inflearn Community Q&A

seojiyu11132340's profile image
seojiyu11132340

asked

Spring for Beginners - Learn Spring Boot, Web MVC, and DB Access Technology with Code

Registering Spring Beans Directly with Java Code

Setter주입을 할때

Written on

·

252

2

private final 변수에서 private으로 변경하신 이유가 있나요??

javaMVCspringspring-boot

Answer 2

1

seojiyu11132340님의 프로필 이미지
seojiyu11132340
Questioner

감사합니다!! 이해가 되었습니다! 

0

yh님의 프로필 이미지
yh
Instructor

안녕하세요. 남서지유님

자바 언어 문법에서 final이 되어 있으면 생성자 시점까지는 값을 넣어주어야 합니다.

Setter는 그것보다 나중에 데이터를 넣어야 하니까요^^

seojiyu11132340's profile image
seojiyu11132340

asked

Ask a question