일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 |
- Spring
- REST API
- 코드 리뷰
- static inner class
- docker
- spring camp
- spring pid
- IntelliJ
- ORM
- spring boot
- JUnit
- 톰캣
- spring jpa
- ApplicationPidFileWriter
- 세미나
- SuperTypeToken
- spring bean
- JPA mapping
- Spring Data JPA
- spring-webmvc #코드읽기
- spring batch 코드
- spring-webmvc
- Spring Data REST
- batch
- JPA
- spring-mvc
- Data REST
- tomcat
- Spring Batch
- spring boot tomcat
- Today
- 3
- Total
- 916,325
woniper
Spring-MVC 읽기 #2. 빌드 본문
Spring-MVC는 Spring Framework의 feature 중 하나다. 때문에 코드를 보기 위해서는 Sprig Framework github 코드를 clone 해야 한다.
clone & build
github repository clone
참고 : Build from Source
$ git clone https://github.com/spring-projects/spring-framework.git
build
$ cd spring-framework
$ ./gradlew build
프로젝트 크기가 커서 빌드가 오래 걸린다.
test spring-webmvc module
$ ./gradlew -a :spring-webmvc:test
코드를 clone 받아 빌드 후 spring-webmvc 모듈을 test 한다. 위 과정이 문제없다면, 이제 코드를 살펴볼 준비가 된 것이다.
import into intellij
참고 : import-into-idea
pre compile
$ ./gradlew :spring-oxm:compileTestJava
intellij에 import 전에 spring-oxm module을 먼저 컴파일한다.
import
File > New > Project from Existing Sources > spring-framework/build.gradle 선택
spring-framework/build.gradle 선택
Use auto-import 체크 후 OK
spring-framework에 포함된 여러 module이 보인다. 그중 spring-webmvc가 바로 Spring-MVC module이다.
spring-web, spring-webmvc
우리가 이제부터 살펴봐야 할 코드는 spring-mvc와 spring-webmvc다. spring-webmvc/build.gradle 에 dependencies를 보면 여러 module에 의존한다.
spring-webmvc는 spring-web module을 기반으로 spring으로 web 개발에 필요한 여러 가지 기능을 제공한다. 대표적으로 우리가 사용해봤거나, 알고 있는 또는 앞으로 알아갈 ViewResolver, ThemeResolver, ResourceResolver, LocaleResolver, HandlerMapping, HandlerAdapter 등이 spring-webmvc에 해당된다.
그리고 spring-webmvc의 핵심이라고 볼 수 있는 FrontController 역할을 하는 DispatcherServlet이 있다.
'Spring' 카테고리의 다른 글
Spring-MVC 읽기 #4. AbstractContextLoaderInitializer (0) | 2018.12.31 |
---|---|
Spring-MVC 읽기 #3. Spring-MVC의 시작 (2) | 2018.12.23 |
Spring-MVC 읽기 #1. 나는 왜 오픈소스를 읽을까? (2) | 2018.12.18 |
실행 중인 Spring Boot pid 파일 생성 (0) | 2018.09.22 |
CompletableFuture 비동기 처리로 성능 개선하기 (0) | 2018.09.08 |
- Tag
- Spring, spring-mvc, spring-webmvc