Spring

Spring 기본 설정방법!

알 수 없는 사용자 2015. 7. 1. 17:46

.XML -> Spring 의 환경설정

Spring-Framework-3.0.2.RELEASE.zip
Spring-Framework-3.0.2.RELEASE-dependencies.zip
C드라이브에 넣어서 압축해제

 

파일 spring-docs을 생성후 Spring-Framework-3.0.2.RELEASE.zip 압축해제 파일을 넣어둔다.
Spring-Framework-3.0.2.RELEASE-dependencies.zip 을 C드라이브 넣어 압축해제

- Java Project 생성
- 프로젝트 선택>Build Path>Configure Build Path...>Libraries탭 선택>Add External JARS... 선택
- 아래 .jar 파일 선택
경로명1 : C:\spring-docs\spring-framework-3.0.2.RELEASE\dist
파일명 :
org.springframework.asm-3.0.2.RELEASE.jar
org.springframework.beans-3.0.2.RELEASE.jar
org.springframework.context-3.0.2.RELEASE.jar
org.springframework.core-3.0.2.RELEASE.jar
org.springframework.expression-3.0.2.RELEASE.jar

Spring은 의존관계이기 떄문에 다양한 자료형에 도움이 필요하다

경로명2 : C:\spring-dependencies\org.apache.commons\com.springsource.org.apache.commons.logging\1.1.1
파일명 :
com.springsource.org.apache.commons.logging-1.1.1.jar

추가한다

 

main 자바를 생성후,

import 하기!
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext; 추가