강의

멘토링

커뮤니티

Inflearn Community Q&A

No author

This post's author information has been deleted.

Spring Boot Concepts and Utilization

Creating an AutoConfiguration Part 1: Starter and AutoConfigure

자동설정으로 다른 프로젝트 빈 사용(번외질문)

Written on

·

343

0

자동설정 만들기에서 궁금증이 생겨 질문드립니다. 

자동설정만들기에서 spring.factories파일안에 자동설정파일(@Configuration 이나 @ConditinalOnxxx 붙은)을 읽어가 거기에 직접 @Bean이나 @Autowired 된 빈을

import한 다른 프로젝트에 자동 등록되어 빈으로 사용가능한것은 이해했습니다. 

 

근데 여기서 import될 프로젝트에서 componentScan으로 빈 등록된 것들은 import 를 해도 다른 프로젝트에서 빈으로 사용이 안되는건가요?

다른 프로젝트에서 빈으로 사용하려면 @Configuration애너테이션이 붙은 객체에 직접 @Bean등록이나 @Autowired를 꼭 넣어줘야하는건지 문의드립니다. 

spring-bootspringjava

Answer

This question is waiting for answers
Be the first to answer!

No author

This post's author information has been deleted.

Ask a question