자바설치
OracleJDK11 설치(22.11기준) ▶︎ JAVA_HOME 설정 ▶︎ cmd ▶︎ java -version으로 확인
스프링3 설치
https://spring.io/ ▶︎ projects ▶︎ spring Tools4 ▶︎ spring Tool suite 3 wiki ▶︎ LatestSTS3 Downloads
스프링4 다운로드 화면 제일 아래쪽에 스프링3다운로드 하는 창이 있음
3-1. spring MVC Project ▶︎ next ▶︎
3-2. 프로젝트명 입력하기 ▶︎ Finish
ex) com.name.web
폴더 위치별 구성요소
<modelVersion>4.0.0</modelVersion> <groupId>com.poseidon</groupId> <artifactId>web</artifactId> <name>jan24</name> 프로젝트명 <packaging>war</packaging> <version>1.0.0-BUILD-SNAPSHOT</version> 버전 <properties> <java-version>11</java-version> 자바 버전 <org.springframework-version>4.3.25.RELEASE</org.springframework-version>스프링버전 <org.aspectj-version>1.7.3</org.aspectj-version> <org.slf4j-version>1.7.25</org.slf4j-version> </properties>
<dependency> <groupId>jar명칭</groupId> <artifactId>새부내용</artifactId> <version>버전</version> </dependency>
<repositories> <repository> <id>mvn2</id> <url>http://repo1.maven.org/maven2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> <repository> <id>egovframe</id> <url>http://www.egovframe.go.kr/maven</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories>
#### 기본설정에 필요한 jar들
<!-- spring jdbc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<!-- 전자정부 페이징 -->
<dependency>
<groupId>egovframework.rte</groupId>
<artifactId>egovframework.rte.ptl.mvc</artifactId>
<version>3.8.0</version>
</dependency>
<!-- 파일업로드 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
<!-- mariadb-java-client -->
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>2.7.3</version>
</dependency>
<!-- mybatis -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.5.6</version>
</dependency>
<!-- mybatis-spring -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.2</version>
</dependency>
**흐름**
요청 → DispatcherServlet → 핸들러 매핑 → 핸들러 어댑터 → 컨트롤러
→ 로직 수행(서비스) → 컨트롤러 → 뷰 리졸버 → 응답(jsp) → 전송
출저:https://blog.naver.com/wisejia/222629949198