[Spring] 스프링 프래임워크
[스프링]Spring /web.xml 구조
해병1188기
2021. 5. 24. 14:44
728x90
반응형
개발환경
스프링 버전 : Spring Tool Suite 3.9.11
JDK 1.8
톰켓 : 8.5
2021.05.17 - [분류 전체보기] - 스프링 다운로드 /STS 다운로드 (3.9.14 v 다운받기)서블릿/JDK 8 호환
스프링 다운로드 /STS 다운로드 (3.9.14 v 다운받기)서블릿/JDK 8 호환
설치 .URL https://github.com/spring-projects/toolsuite-distribution/wiki/Spring-Tool-Suite-3 spring-projects/toolsuite-distribution the distribution build for the Spring Tool Suite and the Groovy/G..
marine1188.tistory.com
2021.03.29 - [JAVA/JAVA(자바)설치 및 툴 이용(ECLIPSE)] - [JAVA] 자바 설치 및 환경 하기 JDK 1.8 버전/ 8버전
[JAVA] 자바 설치 및 환경 하기 JDK 1.8 버전/ 8버전
www.oracle.com/kr/java/technologies/javase/javase-jdk8-downloads.html 위 링크 클릭 하면 여기로 온다 각자의 환경에 맞게 설치 하자 나는 윈도우 64 비트 그전 오라클 로그인 필수 1. 다운로든 된거를 실행..
marine1188.tistory.com
스프링 xml 기본 코드
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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_2_5.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>
</web-app>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
728x90
반응형