1. 일단 스프링부트 3.0 으로 사용하고 자바 17 버전 이상으로 사용하기에 JDK 17 버전을 다운 받는다.
Java Archive Downloads - Java SE 17 (oracle.com)
Java Archive Downloads - Java SE 17
WARNING: These older versions of the JDK are provided to help developers debug issues in older systems. They are not updated with the latest security patches and are not recommended for use in production. For production use Oracle recommends downloading th
www.oracle.com
2. JAVA 17 버전은 TOMCAT 10 버전이상으로 사용하기에 톰캣도 10버전 이상 다운로드 해준다.
https://tomcat.apache.org/download-10.cgi
Apache Tomcat® - Apache Tomcat 10 Software Downloads
Welcome to the Apache Tomcat® 10.x software download page. This page provides download links for obtaining the latest version of Tomcat 10.1.x software, as well as links to the archives of older releases. Unsure which version you need? Specification versi
tomcat.apache.org
3. 톰캣 압출 해제후 bin 으로 들어가기
4. 들어가서 터미널창을 키고 톰캣 실행시키키
** 맥 리눅스 사용자
권한주기 : chmod 755 *
실행 : ./startup.sh
종료 : ./shutdown.sh
*** 윈도우 사용자
실행 : ./startup.sh
종료 : ./shutdown.sh
5. 실행후 http://localhost:8080 으로 들어가보면 이페이지가 나오면 성공이다.
6. 톰캣 실행 위치는
> 참고 -
실행 로그 확인 >
톰캣의 실행 로그는 톰캣폴더
/logs/catalina.out 파일로 확인할 수 있다
실행이 잘 되지 않을 때 해결 방안 톰캣을 실행했지만
http://localhost:8080 에 접근이 되지 않으면
우선 실행 로그를 확인해야 한다.
실행 로그 톰캣폴더/logs/catalina.out 만약 다음과 같은 메시지가 보인다면 어떤 프로그램이 이미 8080 포트를 사용하고 있는 것이다.
java.net.BindException: Address already in use
해결방안1 - 해당 포트를 사용하는 프로그램을 종료한다. 8080 포트를 사용하는 프로그램을 찾아서 종료한다. 만약 종료가 어렵다면 컴퓨터를 재부팅 하는 것도 방법이다.
[MAC OS]
sudo lsof -i :8080 프로세스 ID(PID) 조회
sudo kill -9 PID : 프로세스 종료
[윈도우]
cmd를 열고 아래 명령어 순차적으로 실행 현재 포트를 사용중인 프로세스 찾기
netstat -ano | findstr :포트번호
프로세스 강제 종료하기
taskkill /f /pid 프로세스번
인프런 - 김영한님의 스프링부트 핵심원리의 활용듣고 정리하였습니다.
'기존 > 🏀SptringDependency' 카테고리의 다른 글
[war배포] war 배포 하는 방법 스프링부트 (0) | 2023.03.16 |
---|---|
[Util] 다음 주소록 APi 연동 사용법 (Java,Spring) (0) | 2023.02.27 |