쌤이 준 파일 00.TOOL에 넣고 압축해제 한다음
bundel파일만 잘라내서 복붙
그다음
STS.exe 바로가기 만든 다음에 실행
workspace_spring2로 설정
이클립스 마켓에서 스프링 안깔아도 된다 애초에 설치가 되어있음
그다음 enc 설정
저거 지우고 아파치 톰캣 설정
D:\00.JSP_SPTING\02.SPRING2\workspace_spring2\.metadata\.plugins\org.springsource.ide.eclipse.commons.content.core
여기에 http-context.xml 넣기
이클립스 다시켜고 SpringMVC 선택 -> fin -> 다시 선택 - >kr.or.ddit 입력 -> fin
프로젝트 클릭 -> 우클릭 -> maven clean -> maven build 선택
compile 입력 **스펠링 중요!!
BUTLD SUCCESS 뜨면 완료
web.xml에 코드 추가
<!--
한글 처리를 위한 UTF-8필터 등록
JSP나 서블릿 처리할때마다 넘겨받은 request를 setCharacterEncoding으로 UTF-8설정했던 부분을
encodingFilter로 대체
-->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
web.xml 전체 코드
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee https://java.sun.com/xml/ns/javaee/web-app_3_1.xsd">
<!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/root-context.xml</param-value>
</context-param>
<!-- Creates the Spring Container shared by all Servlets and Filters -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Processes application requests -->
<servlet>
<servlet-name>appServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<!--
한글 처리를 위한 UTF-8필터 등록
JSP나 서블릿 처리할때마다 넘겨받은 request를 setCharacterEncoding으로 UTF-8설정했던 부분을
encodingFilter로 대체
-->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
버전 변경
엄청 clean 누르고 크롬 localhost 입력