인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

Jd Lee's profile image
Jd Lee

asked

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

Spring Data JPA

5:27 이름에 SpringDataJpa만 있으면

Written on

·

355

0

빈에 자동으로 등록시켜준다는 건가요?

스프링에서 이 인터페이스가 스프링데이터jpa인지 어떻게 알 수 있나요?

어떤 방식으로 인식을 하는건가요?

javaspringmvcspring-boot

Answer 1

1

안녕하세요, Jd Lee 님! 공식 서포터즈 codesweaver 입니다.

스프링 컨테이너가 어떻게 Repository를 자동으로 인식하여 빈으로 등록하는지 묻는 질문이군요.

 

강의에서 작성한 SpringDataJpaRepository는 JpaRepository를 상속하고 있습니다. 바로 이 상속이 중요합니다. 스프링은 JpaRepository를 상속한 객체를 빈으로 등록 합니다.

감사합니다.

Jd Lee's profile image
Jd Lee

asked

Ask a question