개발 공부/Spring

[Spring] 이클립스 스프링 플러그인 설치 (Spring Tool Suite)

sngynhy 2021. 9. 28. 10:07

스프링 설치 방법

1. 스프링 부트

2. 플러그인★

3. A to Z

 

 

 

 

1. 마켓플레이스 spring tool suite 검색 후 설치

 

2. 위와 같은 툴이 나오지 않을 때

help - Install new software 클릭
add 클릭하여 위와 같이 기재

Location : https://dist.springsource.com/snapshot/TOOLS/nightly/e4.18

 

 

 

3. Spring Legacy Project 생성하기

Spring Legacy Project 선택
템플릿 Spring MVC Project 선택 후 Next
level 설정 (보통 3단계  ex> com.name.app) - 기본적으로 controller를 제공

 

위와 같은 방법으로 성공적으로 설치가 되었다면

생성된 project의 properties에 Spring이 추가됨!

properties - ProjectFacets - 자바 버전 설정, Runtimes에 서버(톰캣) 연결 후 Apply

 

Spring 구조 설정

1. src/main/resources 내부에 log4.xml만 남겨두고 META-INF 제거

   webapp - WEBINF 내부에 web.xml 있는지 확인 후 Spring, View 제거

 

2. web.xml -> web-app 루트 엘리먼트를 제외한 나머지 요소 삭제

 

3. pom.xml -> 3.1.1 -> 4.2.4로 버전 수정

<org.springframework-version>4.2.4.RELEASE</org.springframework-version>

4. Maven Dependencies -> 4.2.4로 변경되었는지 확인

프로젝트 -> 우클릭 -> maven -> update project -> ok (or force 클릭 후 ok)

 

다음과 같이 모두 변경되었다면 완료!

Libraries - Maven Dependencies - spring 관련 jar파일 버전 변경 확인