Spring/스프링 기본

Spring VS Spring boot

공대키메라 2022. 2. 3. 13:36

필자는 inflearn의 강의에 중독될 만큼 많은 강의를 사서 수강하고 있다. (나는야 욕심쟁이... 올 ㅋ)

 

근데 문득 든 궁금증인데 왜 다들 Spring boot 를 이용해서만 강의를 할 까 하는 생각이 들었다. 

 

확실히 Spring boot 가 프로젝트를 생성하고 사용하는데 기본적인 설정을 많이 해줘서 편하기 때문에 하는 것 같은 생각이 들긴 했다. 이것이 맞는 이유인지도 궁금하고 진짜 차이점이 무엇인지 알아보기로 했다. 

 

구글에 한번 검색을 해봤다. 

 

...  Spring ... vs Spring ... boot ...

 

google : spring vs spring boot

 

가장 상단에 노출된 사이트에 한번 들어가보니 정리가 잘 되있다. 

 

https://www.interviewbit.com/blog/spring-vs-spring-boot/

 

내용 발췌

 

Spring란?

What is Spring? Spring is a lightweight application framework and we can say it is similar to the framework of frameworks because it provides support to various frameworks such as Struts, JSP, Hibernate, etc. The first version of the Spring framework was written by Rod Johnson in 2002 and the framework was first released in 2003 under the Apache license version 2.0.
스프링이란? 스프링은 경량 애플리케이션 프레임워크며 Struts, JSP, Hinernate 등등의 다양한 프레임워크를 지원하기 때문에 프레임워크의 프레임워크와 비슷하다고 말할 수 있다. 
스프링 프레임워크의 첫번째 버전은 2002년 로드 존슨에 의해 만들어졌고 2003년 아파치 라이센스 버전 2.0로 출시됐다. 

 

Spring boot란?

Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications. It’s a Java-based framework used to create a microservice ( microservice is defined as the small services that work together. The microservice defines an approach to the architecture that divides an application into a pool of loosely coupled services that implement business requirements).
스프링 부트는 stand-alone, production-grade 스프링 기반 애플리케이션을 만들기 쉽게 한다. 마이크로 서비스를 만들기 위해 사용되는 자바 기반 프레임워크다.
(마이크로서비스는 함께 작동하는 작은 서비스들로 정의된다. 마이크로서비스는 하나의 어플리케이션을 비즈니스 요구사항들을 이행하는 느슨하게 연결된 서비스들의 집합으로 나누는 구조로의 접근을 정의한다)

 

그래서... 주요 차이점은 뭔가?

Now we have a complete idea about what is Spring and Spring Boot so let’s just go through the key differences between Spring and Spring Boot.

Basically, Spring is a lightweight application framework and we can say it is similar to the framework of frameworks because it provides support to various frameworks such as Struts, JSP, Hibernate, etc. and it’s used to build applications whereas Spring Boot is a spring-based framework that is mainly used to develop REST API’S.

The key difference or key feature of Spring is dependency injection and for spring boot it’s autoconfiguration, with the help of Spring Boot Framework developers can reduce development time, Developer Effort, and increase productivity.

우리는 스프링과 스프링 부트에 대해 완벽히 이해했으니 두개의 사이첨제 대해 알아가자

기본적으로, 스프링은 경량 애플리케이션 프레임워크며 Struts, JSP, Hinernate 등등의 다양한 프레임워크를 지원하기 때문에 프레임워크의 프레임워크와 비슷하다고 말할 수 있다.(아까 본 내용인데...?)
반면에 스프링 부트는 REST API's 를 개발할 때 주로 사용되는 프레임 워크다. 

주요 차잉점 또는 스프링의 중요한 특징은 의존성 주입이다. 스프링 부트에서는 이를 위해 autoconfiguration이 있는데 이는 스프링 부트 개발자들이 개발 시간, 노력, 그리고 생산성을 향상시키는데 도와준다! 

 

이후로도 표로 나누어서 스프링과 스프링 부트에 대해서 좀 더 자세하게 설명을 해준다. 

 

스프링은 일일이 다 설정을 해줘야하지만 스프링 부트는 무언가 자동적으로 해주는 일이 많지만 또한 사용하지 않는 기능인데 기본적으로 들어가게 되는 경우도 있다. 

 

그러므로 어떤 것을 사용할지 적절히 판단해서 사용해야 할 것이다. 

 

참고 : https://www.interviewbit.com/blog/spring-vs-spring-boot/

'Spring > 스프링 기본' 카테고리의 다른 글

Glory of Rest 란 뭘까? + HATEOS 적용기  (0) 2022.02.16
Spring Web Socket 적용하기  (2) 2022.02.04
@Json~~~ 관련 annotation 정리  (0) 2022.02.03
Bean이란?  (2) 2022.01.28
MVC 어노테이션 정리  (0) 2022.01.19