BackEnd/Spring & Springboot Study
[프로젝트 환경설정] 02. 라이브러리 살펴보기
JunGi Jeong
2021. 3. 31. 22:40
스프링 부트 라이브러리
- spring-boot-starter-web
- spring-boot-starter-tomcat:톰캣 (웹서버)
- spring-webmvc: 스프링 웹 MVC
- spring-boot-starter-thymeleaf: 타임리프 템플릿 엔진(View)
- spring-boot-starter(공통): 스프링 부트 + 스프링 코어 + 로깅
- spring-boot
- spring-core
- spring-boot-starter-logging
- logback, slf4j (slf4j -> interface + logback) System.out.println -> logger로 전환하라
- spring-boot
테스트 라이브러리
- spring-boot-starter-test
- junit: 테스트 프레임워크 (Junit5쓰는 추세)
- mockito : 목 라이브러리
- assertj: 테스트 코드를 좀 더 편하게 작성하게 도와주는 라이브러리
- spring-test : 스프링 통합 테스트 지원
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' //template Engine
implementation 'org.springframework.boot:spring-boot-starter-web' // web
testImplementation 'org.springframework.boot:spring-boot-starter-test' // junit 5
}
위 3가지만 명시 했지만 gradle/maven등은 의존관계를 관리를 해준다.
위에서 적어놓은 것 처럼 spring-boot-starter-web를 사용한다고 치면 spring-boot-starter-tomcat, spring-webmvc 등 의존관계로 필요한 library들을 가져오고 -> 또 가져오고 그리하여 여러 라이브러리들을 불러온다.