Spring 설치방법 (Exclipse에서 Legacy Project 및 MVC Project 없을 시)
이클립스에서 Spring을 설치하니 Legacy Project와 MVC Project가 표시되지 않았다.
이러한 현상이 발생한 이유를 찾아보니 Spring Tool Suite 4는 Spring boot가 기본이라서 Legacy Project가 지원되지 않는다고 한다. 해결법을 찾으니 Add-on 프로그램을 설치하라고 한다. 하지만 설치하니 MVC Project가 표시되지 않았다.
(STS4 버전이 업그레이드 되면서 Add-on 방식도 호환성이 맞지 않아서 발생한다고 한다.)
그래서 이클립스에서 Spring을 설치하는것을 포기하고 아래 링크에서 별도로 다운로드해서 사용하였다.
https://github.com/spring-attic/toolsuite-distribution/wiki/Spring-Tool-Suite-3
GitHub - spring-attic/toolsuite-distribution: the distribution build for the Spring Tool Suite and the Groovy/Grails Tool Suite
the distribution build for the Spring Tool Suite and the Groovy/Grails Tool Suite - GitHub - spring-attic/toolsuite-distribution: the distribution build for the Spring Tool Suite and the Groovy/Gra...
github.com
해당 링크에 접속 후 오른쪽에서 원하는 버전을 클릭 후 설치하면 된다.
이제 다 끝난줄 알고 MVC Project를 생성하니 아래와 같은 오류가 표시되었다.
"an error has occurred. see error log for more details. could not initialize class com.thoughtworks.xstream.converters.collections.propertiesconverter"
오류 팝업이 뜨면서 프로젝트가 생성되지 않아서 여러 검색 끝에 아래와 같은 방법으로 해결하였다.
해결방법
1. Java11 버전을 설치한다.
2. 위에서 설치한 STS 폴더에 들어간 후 STS.ini 를 실행한다.
3. -vmargs위에 아래의 문구를 추가한다.
-vm
C:\Program Files\Java\jdk-11.0.17\bin\javaw.exe
위와 같이 설정 후 저장한 뒤 MVC Project가 정상적으로 생성되었다.