[200608.71일차] Spring 1 - 기본 설정 & 아파치 톰캣 배포 & Jenkins & Maven
Spring Tool 설치
Eclipse 상단 메뉴 Help > Eclipse Marketplace
sts 검색 > 제일 위에 있는 Spring Tools 3 Add-On for Spring Tools 4 3.9.13.CI Install
레거시 프로젝트 생성
Spring Legacy Project
레거시 프로젝트 -> 하나하나 파일을 다 만들고, 하나에서 전부 처리하겠다는 의미를 가진 프로젝트
=> 하나의 프로젝트에서 처리하니 프로젝트 크기가 커짐
=> 파일을 번역하다 보면 시간이 오래 걸림 -> 임시점검 -> 회사의 손실
=> 프로젝트를 작게 나눠서 작업하기 시작함
=> MAS ( 마이크로 서비스 아키텍쳐 )
: 하나의 큰 어플리케이션을 여러개의 작은 어플리케이션으로 쪼개어 변경과 조합이 가능하도록 만든 아키텍쳐
서버 생성 (추가)
Spring 버전 맞추기
=> pom.xml에서 설정
실행
전처럼 ctrl + F11 하면 경로 오류가 난다.
WEB-INF 부터 지우면 정상적으로 실행된다.
환경 설정 (인코딩, 브라우저 설정)
실행 => 프로젝트 자체를 Ctrl + F11
Spring Web MVC 모듈
경로를 요청하면 페이지를 보여준다.
접근 경로 설정
원래 주소는 ip:port/패키지마지막명/
ip:port로 접근
이전처럼 접근하면 없는 경로로 뜸
배포하기
아파치 톰캣
https://tomcat.apache.org/download-90.cgi
Apache Tomcat® - Apache Tomcat 9 Software Downloads
Welcome to the Apache Tomcat® 9.x software download page. This page provides download links for obtaining the latest version of Tomcat 9.0.x software, as well as links to the archives of older releases. Unsure which version you need? Specification version
tomcat.apache.org
포트 충돌을 막기 위해 설정
Connector port를 9000으로 바꿈
프로젝트 war 파일로 내보내기
아이피:포트/spring01로 접근
수정
새로고침하면 수정된 내용이 바로 적용된걸 확인 할 수 있음
Jenkins
=> CI(Continuous Integration) 툴 중의 하나.
CI : 소프트웨어 개발 시 지속적으로 통합 서비스를 제공하는 툴
https://www.jenkins.io/download/
Jenkins installation and setup
Jenkins – an open source automation server which enables developers around the world to reliably build, test, and deploy their software
www.jenkins.io
localhost:9000/jenkins
설치 및 계정 생성






빌드 유발
Git-hub와 연동
jdk 경로 확인
jdk 설정
=> automarically를 체크 해제하고 직접 경로를 설정한다. (이름은 아무거나 상관 없음)
git도 직접 경로를 설정한다. (이름은 아무거나 상관 없음)
설정한 jdk와 git을 Save한다.
Git => test 파일 생성
Maven
=> 자바용 프로젝트 관리도구 중 하나
http://maven.apache.org/download.cgi
Maven – Download Apache Maven
Downloading Apache Maven 3.6.3 Apache Maven 3.6.3 is the latest release and recommended version for all users. The currently selected download mirror is http://apache.tt.co.kr/. If you encounter a problem with this mirror, please select another mirror. If
maven.apache.org