https://tomcat.apache.org/download-90.cgi
spring tool 상단 Help > Install New Software... > work with 에 http://download.eclipse.org/releases/2020-12 입력 후 엔터 > 맨 마지막에 web,xml,java ee and OSGi Enterprise Develoment 설치
preference -> JAVA EE
maven project 생성하면 web.xml 없다고 에러뜸
src/main/webapp 에다가
/Users/{USERNAME}/Desktop/apache-tomcat-9.0.53/webapps/Root 의 WEB-INF 폴더를 붙여넣기함
// in pom.xml
<!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-api -->
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-api</artifactId>
<version>9.0.53</version>
</dependency>
https://mvnrepository.com/artifact/org.springframework/spring-webmvc/5.2.9.RELEASE
spring-web-mvc
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.2.9.RELEASE</version>
</dependency>
extends httpServlet 를 하지 않는다.
스프링에서 front contoller 역활을 하기 때문에 (미리 작성된 servlet 코드를 사용하는 것)
기존 servlet에서 url 을 작성했는데
지금은 스프링이 servlet 코드를 관리하니
url 을 작성하기 위해선 web.xml 을 통해 url 을 적어주어야한다.