** 자기 공부용 및 암기용으로 포스팅하는 글 입니다.
** 정확한 정보는 보장 할 수 없으니, 참고용으로만 봐주시면 감사하겠습니다.
** 제 개인적인 생각 및 자기 암시목적으로 작성되기에 이점 양해 부탁드립니다.
들어가기에 앞서..
KDT 수업에서는 Spring Boot 2.x 버전을 기준으로 소스를 작성할 예정이라고 한다..
현재는 Spring Boot에서 2.x 버전의 지원이 중단 되었으므로, 사용자가 직접 적용해야한다.
★ 알아볼 내용
1. 초기 설정 셋팅
2. Spring initializr 사용 방법
내용 설명
1. 초기 설정 셋팅
초기 셋팅은 아래의 세 가지를 해야한다.
1) PC에 JDK-11이 설치 되어 있어야 함.
2) 환경 변수에 JAVA_HOME이 설정 되어야 함.
3) PC에 IntelliJ Community Edition이 설치 되어 있어야함.
1번과 3번은 충분히 홈페이지에 들어가 설치 할 수 있으니 환경변수 설정 값 부터 확인해 보자.
설정해야 할 환경 변수 설정 값
① [찾기/검색] 에서 윈도우 환경 변수 입력 후 클릭
② 시스템 속성 -> 고급 -> 환경 변수 클릭
③ 시스템 변수에서 새로만들기
④ 변수 이름 : CLASSPATH
변수 값 : %JAVA_HOME%\lib
⑤ 변수 이름 : JAVA_HOME
변수 값 : zulu-11 폴더 위치
ex) C:\Program Files\Zulu\zulu-11
⑥ 시스템 변수에서 변수 명이 Path인것을 찾아 클릭 후 편집 버튼 클릭
⑦ 환경 변수 편집 창에서 새로 만들기
⑧ zulu-11폴더 안 bin폴더로 경로 추가
ex) C:\Program Files\Zulu\zulu-11\bin\
2. Spring initializr 사용 방법
위 링크를 타고 들어가면 spring initalizr를 사용할 수 있다.
위 사진과 같이 Spring Boot 지원이 3.x 이후로 가능하기에 우리는 3.3.0으로 파일 생성 후 Gradle 파일에서 직접 수정을 진행해야 한다. 또한, JAVA도 11을 사용하기에 그 또한 변경해 줘야한다.
Dependencies 에서 ADD DEPENDENCIES를 클릭하여 원하는 라이브러리를 미리 설치 할 수 있다.
이후 나는 수업에서 진행하는 SpringFramework boot 버전에 맞춰서 사용하기 위해
Gradle 파일을 수정하였다.
현재 spring initalizr에서는 최소 지원하는 자바 버전이 17이고, 이에 맞춰서 지원하고 있는 SpringFramework 버전은 3.x.x이다.
아래와 같이 Springframework 버전과 java버전을 하향한다면, 다운그레이드가 가능하다.
'Spring 지식 및 공부' 카테고리의 다른 글
[Spring] 아키텍처 ( Architecture ) (0) | 2024.07.04 |
---|---|
[Spring] AOP & PSA (0) | 2024.07.03 |
[Spring] IoC/DI (1) | 2024.06.30 |
[Spring] POJO (Plain Old Java Object) (0) | 2024.06.29 |
[Spring] Lombok 사용 방법 및 적용 방법 (0) | 2024.06.19 |