의존성 주입[DI]과 역전제어[IOC]
스프링에서 우리가 의존성 주입으로 흔히 보는 것은
@Component , @Autowired , @Quailfier , @Resource 같은 것들이다.
스프링의 의존성 주입은 강한결합을 느슨하게 해준다.
의존적으로 주입되어 있어서 결합도가 느슨해 진것이다.
스프링 프레임워크로 인해 제어를 프로그래머보다
프레임워크로 하게 됨으로써 제어의 역전 현상이 일어난다.
이 IOC된 프레임워크에 주입된 객체 빈(Beans)들을 사용하는 것이다.
이것은 우리가 실생활에서 용도에 맞게 만들어진(IOC) 가위를 가져다 사용하는 것과 같다.(하기참조)
스프링 프레임워크란?
The Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise applications - on any kind of deployment platform.
스프링의 핵심요소는 ?
A key element of Spring is infrastructural support at the application level: Spring focuses on the "plumbing" of enterprise applications so that teams can focus on application-level business logic, without unnecessary ties to specific deployment environments.
스프링 프레임워크는 이처럼 안정성과 신뢰성이 확보가 잘되어 기업용 애플리케이션의 요구사항 해결(비즈니스 로직)에 초점을 맞추게 해준다.