WEB/2020_webCamp

JSP / Spring 개발을 위한 환경 설치 (MAC)

HBean_ 2020. 8. 3. 23:52

JSP : Java Server Page // java를 사용하는 html

Spring : Java 플랫폼을 위한 어플리케이션 프레임 워크

 

  • 프레임워크란?
  • 개발자들이 생산하는 코드 품질 및 개발 속도를 맞추기 위해 정해진 표준 개발 방법을 제공해주는 어플리케이션
  • 개발할 때 설계 기본이 되는 뼈대나 구조 또는 환경 마련

 

WAS (web application server) : java의 어플리케이션 (JSP) 을 처리하기 위한 서버 // jsp, spring은 apache에서는 동작X

 

  • DB 조회나 다양한 로직 처리를 위해 동적 컨텐츠를 제공하기 위해 만들어진 application server
  • Web server + web container : was는 jsp, servlet 구동 환경을 제공
  • WAS의 대표적인 예 : Tomcat // 무료로 많이 사용

-> Tomcat (서버) + JDK (자바 사용) + DB

-> 닷홈은 APM 환경이라 설치 불가

 

개발 환경 준비

  1. JDK 8 설치 : JVM (java virtual machine) 필요
  2. 8.5 tomcat : was
  3. Spring tool suite 4 (STS) : 스프링 프레임워크 기반 개발을 지원하는 도구
  4. Meven3 : 자동으로 필요한 library 관리   

1. JDK 8 설치

 

https://www.oracle.com/java/technologies/javase-jdk14-downloads.html

 

컴퓨터 환경에 따라 선택하여 다운

 

터미널 또는 CMD창에서 "java -version" 을 쳐보면 설치 확인가능! 

 

 

2. 8.5 tomcat 설치

 

https://tomcat.apache.org/download-80.cgi

 

Apache Tomcat® - Apache Tomcat 8 Software Downloads

Welcome to the Apache Tomcat® 8.x software download page. This page provides download links for obtaining the latest versions of Tomcat 8.x software, as well as links to the archives of older releases. Unsure which version you need? Specification versions

tomcat.apache.org

 

컴퓨터 환경에 적합한 것을 선택해서 다운 후 압축풀기

 

3. Spring tool suite 4 (STS) 설치

 

https://spring.io/tools

 

Spring Tools 4 is the next generation of Spring tooling

Largely rebuilt from scratch, Spring Tools 4 provides world-class support for developing Spring-based enterprise applications, whether you prefer Eclipse, Visual Studio Code, or Theia IDE.

spring.io

 

컴퓨터 환경에 따라 선택하여 다운받고 설치

 

4. Meven3 설치

 

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://mirror.apache-kr.org/. If you encounter a problem with this mirror, please select another mirror

maven.apache.org

 

맞는 환경 선택하여 다운받고 압축 해제

 

Maven Path 설정

 

1. 터미널을 열고 vi ~/.bash_profile 를 친다.

 

2. i를 눌러 아래와 같이 압축 파일을 연 위치를 적는다.

export M2_HOME=/Users/haelingim/Downloads/Program/apache-maven-3.6.3(위치)

export PATH=$PATH:$M2_HOME/bin

 

 

3. source ~/.bash_profile 로 새로고침한다.

 

4. mvn -version 으로 확인한다.