※ 이전 편 : 2025.01.06 - [🍃 Spring/🍃 Spring Boot] - [SpringBoot]스프링 빈 등록:1.컴포넌트 스캔과 자동 의존관계 설정 자바코드를 적어 스프링 빈을 등록해보자. 서비스와 리포지토리의 @Service @Repository @Autowired 어노테이션을 모두 지워준다.main에 SpringConfig클래스를 만든다.SpringConfig 코드@Configuration 어노테이션을 클래스 위에 적는다.@Bean 어노테이션을 서비스와 리포지토리 메서드에 적어준다.컨트롤러는 그대로 어노테이션 @Controller와 @Autowired가 필요하다. config 전체코드더보기package hello.hellospring;import org.springframewor..