Java를 공부하다 보면 new 키워드로 객체를 생성하고, 해당 객체의 메서드를 호출해 기능을 구현하게 된다. 이렇게 Java만으로도 충분히 프로그램을 만들 수 있는데, 왜 많은 Java 백엔드 애플리케이션에서는 Spring Framework를 사용하는 걸까? Spring이 없어도 객체를 생성할 수 있고, 비즈니스 로직을 구현할 수 있으며, 데이터베이스에 접근하는 코드도 작성할 수 있다. ❓ 그렇다면 Spring은 무엇을 해결해 주는 걸까? 이 질문에 답하기 위해 Spring 없이 작성한 Java 코드에서 출발해, Spring Framework가 등장한 배경과 제공하는 기능들을 살펴보려고 한다. 1. 순수 Java로 애플리케이션을 개발한다면? 먼저 Spring을 사용하지 않고 간단한 주문 처리 프로그램을 만든다고 가정해 보자. 주문을 처리하는 OrderService와 주문 정보를 저장하는 OrderRepository가 필요하다.
import org.springframework.context.annotation.Configuration
As seen in:
DEV Community,
The Code Project,
DZone,
cnblogs.com,
CSDN,
Developer.com,
Open Source For You,
51cto.com,
itpub.net,
脚本之家
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with import
Contact import, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack