From 0869e803fd2ac9db73c377cb25cbb4010d8dcd45 Mon Sep 17 00:00:00 2001 From: banjjoknim Date: Mon, 21 Dec 2020 21:23:51 +0900 Subject: [PATCH] =?UTF-8?q?[=EA=B9=80=EC=98=81=ED=95=9C=EB=8B=98=EC=9D=98?= =?UTF-8?q?=20=EC=8A=A4=ED=94=84=EB=A7=81=20=EC=9E=85=EB=AC=B8=20-=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=EB=A1=9C=20=EB=B0=B0=EC=9A=B0=EB=8A=94=20?= =?UTF-8?q?=EC=8A=A4=ED=94=84=EB=A7=81=20=EB=B6=80=ED=8A=B8,=20=EC=9B=B9?= =?UTF-8?q?=20MVC,=20DB=20=EC=A0=91=EA=B7=BC=20=EA=B8=B0=EC=88=A0]=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8=20=ED=99=98=EA=B2=BD?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20-=20'=EB=9D=BC=EC=9D=B4=EB=B8=8C=EB=9F=AC?= =?UTF-8?q?=EB=A6=AC=20=EC=82=B4=ED=8E=B4=EB=B3=B4=EA=B8=B0'=20=EC=88=98?= =?UTF-8?q?=EA=B0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SpringBoot-Introduction/Lectures/Contents.md | 3 +- SpringBoot-Introduction/Lectures/Lecture02.md | 51 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 SpringBoot-Introduction/Lectures/Lecture02.md diff --git a/SpringBoot-Introduction/Lectures/Contents.md b/SpringBoot-Introduction/Lectures/Contents.md index 8842f69..5e95ad3 100644 --- a/SpringBoot-Introduction/Lectures/Contents.md +++ b/SpringBoot-Introduction/Lectures/Contents.md @@ -1,4 +1,5 @@ # Contents ## 프로젝트 환경설정 -- [프로젝트 생성](https://github.com/banjjoknim/spring-introduction/blob/master/Lectures/Lecture01.md) \ No newline at end of file +- [프로젝트 생성](https://github.com/banjjoknim/spring-introduction/blob/master/Lectures/Lecture01.md) +- [라이브러리 살펴보기](https://github.com/banjjoknim/spring-introduction/blob/master/Lectures/Lecture02.md) \ No newline at end of file diff --git a/SpringBoot-Introduction/Lectures/Lecture02.md b/SpringBoot-Introduction/Lectures/Lecture02.md new file mode 100644 index 0000000..0188ba8 --- /dev/null +++ b/SpringBoot-Introduction/Lectures/Lecture02.md @@ -0,0 +1,51 @@ +# 라이브러리 살펴보기 +- `build.gradle`의 `dependencies`에서 확인할 수 있다. + +--- + +## `External Libraries` +- 프로젝트 내부에 에서 현재 다운로드된 라이브러리들을 확인할 수 있다(매우 많다!). + +--- + +## `Maven`, `Gradle`과 같은 빌드 툴 +- 의존관계를 관리해준다. +- `spring-boot-starter-web` 라이브러리를 가져오면 `spring-boot-starter-tomcat` 등과 같이 추가로 필요한(의존관계가 있는) 라이브러리를 같이 가져온다. + +--- + +## Gradle(우측 세로 메뉴) +- 현재 가져온 라이브러리들을 확인할 수 있다. +- 라이브러리들을 보다보면 `(*)` 표시를 볼 수 있는데, 이미 다른 라이브러리에서 가져온 라이브러리라는 의미로 중복을 제거한 것이다. + +--- + +## `spring-boot-starter-tomcat` +- 고대에는 톰캣과 같은 웹서버(WAS)를 직접 설치해놓고 자바 코드를 밀어넣는 식 사용하여 웹서버와 개발 라이브러리가 분리되어 있있다. +- 최근에는 소스 라이브러리에서 웹서버를 내장하고(임베디드) 있다. +- 그래서 실행만 해도 웹서버가 나온다(따라서 설정이 필요가 없다). + +--- + +## `spring-boot-starter` +- 스프링부트와 관련된 프로젝트를 사용하면 웬만해서는 의존관계가 다 가져와지므로 직접 가져오지 않아도 괜찮다. + +스프링부트와 관계된 라이브러리를 쓰면 `spring-core`까지 다 가져와서 스프링 관련된 세팅이 되면서 프로그램이 돌아간다고 이해하자. + +--- + +## `spring-boot-starter-logging` +- 현업에서는 로그로 출력을 해야한다. +- 로그로 남겨야 심각한 에러를 모아보거나 로그 파일들의 관리가 가능하기 때문이다. +- `slf4j`, `logback`의 두 라이브러리를 포함하고 있다. +- 로그에 대해 궁금하다면 위의 두 가지 라이브러리를 공부해보자. + +--- + +## `spring-boot-starter-test` +- 자바진영에서는 `JUnit`이라는 라이브러리를 사용한다. +- `mockito`, `assertj` 등 테스트를 편리하게 하도록 도와주는 라이브러리들이 포함되어 있다. +- `spring-test` + - 스프링과 통합해서 테스트할 수 있도록 해주는 라이브러리이다. + +--- \ No newline at end of file