환경설정/Spring · 2024. 9. 30.

Spring, Spring 환경설정

728x90
Spring 환경설정

 

Spring Framework를 설치할건데 Spring Framework는 JDK 11, Tomcat 9.0, spring 5.x 사용해야 잘 처리된다.

 

Spring 6.x 에서는 Tomcat 9.0 과 연결이 제대로 되지 않는다.

=> The superclass "jakarta.servlet.http.HttpServlet" was not found on the Java Build Path 에러 발생한다.

 

그래서 STS.ini 파일에서 JDK 11로 설정하고, 프로젝트를 생성한 뒤 JDK 버전을 바꾸어서 사용하면 된다.

 

=> Spring Legacy Project가 아직 JAVA 17을 지원하지 않아서 발생하는 에러이다.


 

1. JDK 설치 - JDK 11 (java.oracle.com)

 

https://www.oracle.com/kr/java/technologies/downloads/#java11-windows

 

Download the Latest Java LTS Free

Subscribe to Java SE and get the most comprehensive Java support available, with 24/7 global access to the experts.

www.oracle.com

 

JDK 11 다운로드

(각자 원하는 환경의 파일로 다운로드)

 

다운받은 *.exe 파일 더블클릭

 

현재 JDK 버전 확인하기


2. STS 다운로드

 

STS (Spring Tool Suits) - 스프링 전용 이클립스

 

Spring.io

 

 

gitHub 페이지로 들어가는데 그 아래 각자에 맞는 버전으로 *.zip 파일 다운로드

 

(내가 다운받은거 -> https://download.springsource.com/release/STS/3.9.18.RELEASE/dist/e4.21/spring-tool-suite-3.9.18.RELEASE-e4.21.0-win32-x86_64.zip)

* lib가 아니라 스프링에 압축을 풀어야한다.

lib에 압축을 풀지 말고 Spring에 풀면 sts-bundle이라고 압축이 풀린다


 

3.Commons 다운로드

 

http://commons.apache.org/logging/download_logging.cgi

 

Apache Commons Logging – Download Apache Commons Logging

Download Apache Commons Logging Using a Mirror We recommend you use a mirror to download our release builds, but you must verify the integrity of the downloaded files using signatures downloaded from our main distribution directories. Recent releases (48 h

commons.apache.org

 

commins_logging-1.3.4-bin.zip 다운로드

 

 

이것도  lib에 압축을 풀지 말고 Spring에 풀면 commons-logging-1.3.4 이라고 압축이 풀린다

 

 


STS.ini

 

부팅하는 동안만 11로 유지해줘야한다.

 

STS.ini - D:\Spring\sts-bundle\sts-3.9.18.RELEASE

1. 버전 11 확인


2. openFile 밑에 위치 입력 (jdk 위치 찾아가는 구문)
-vm
C:\Program Files\Java\jdk-11\bin\javaw.exe

728x90