✏️ 한 줄 정리생성자 주입을 사용하자Spring Boot에서 의존성 주입(Dependency Injection, DI) 방식에는생성자 주입, 필드 주입, 세터 주입이 있다. 1. 생성자 주입 (Constructor Injection) 가장 권장@Componentpublic class ExampleService { private final ExampleRepository exampleRepository; @Autowired // 최신 Spring 버전에서는 생략 가능 public ExampleService(ExampleRepository exampleRepository) { this.exampleRepository = exampleRepository; }} ✅ 불변성 유..