개발/Spring Boot
-
스프링 프레임워크와 스프링 부트개발/Spring Boot 2023. 7. 15. 00:29
Spring Framework에 필요한 모듈들을 추가하다 보면 설정이 복잡해지는 문제를 해결하기 위해 Spring Boot가 등장했다. Spring Boot는 별도의 복잡한 설정 없이, 사용할 수 있는 프레임워크이다. 의존성 관리 스프링 프레임워크에서는 개발에 필요한 각 모듈의 의존성을 직접 설정해야 했다. 프레임워크와 호환되는 버전을 명시해야하며 연관된 다른 라이브러리의 버전까지도 고려해야했다. 스프링 부트에서는 이런 불편함을 해소하기 위해 'spring-boot-starter'라는 의존성을 제공한다. spring-boot-starter의 의존성은 여러 종류가 있고, 기능과 모듈의 호환성을 고려하여 최적의 조합을 제공한다. 아래는 많이 사용되는 spring-boot-starter 라이브러리이다. spr..
-
스프링 부트란? - IoC, DI와 AOP개발/Spring Boot 2023. 7. 15. 00:10
Spring Boot는 Spring Framework의 다양한 프로젝트 중 하나이다. 스프링 프레임워크는 자바에서 가장 많이 사용되는 프레임워크이다. 스프링은 자바 언어를 이용해 엔터프라이즈급 개발을 편리하게 만들어주는 프레임워크이다. 제어 역전 (IoC; Inversion of Control) 일반적인 자바 개발에서는 사용하려는 객체를 먼저 선언하고, 해당 객체의 의존성을 생성한 후 객체에서 제공하는 기능을 사용한다. 객체를 생성한 뒤 객체를 이용하는 작업을 개발자가 직접 제어하는 형태이다. 제어 역전은 기존 자바 개발 방식과 다르게 동작한다. 제어 역전 환경에서는 사용할 객체를 직접 생성하지 않고 객체의 생명주기 관리를 외부에 위임하는 형태이다. (스프링에서 '외부'는 스프링 컨테이너 또는 IoC 컨..