<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
<!-- Enables the Spring MVC @Controller programming model -->
<annotation-driven />
<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
<resources mapping="/resources/**" location="/resources/" />
<resources mapping="/resources1/**" location="/resources1/" />
//리소스폴더를 추가한경우 맵핑 해줘야 된다.
<!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<context:component-scan base-package="com.king.spring" />
</beans:beans>
'JAVA > Spring 4.0' 카테고리의 다른 글
Spring4.0 스프링 MVC의 주요 구성요소 (0) | 2015.09.16 |
---|---|
Spring4.0 web.xml 캐릭터 인코딩 필터 설정 (0) | 2015.09.16 |
Spring4.0 HomeController.java (0) | 2015.09.16 |
Spring4.0 이클립스 MVC 프로젝트생성 및 index.jsp로 매핑 (0) | 2015.09.16 |
Spring4.0 시작하기 (0) | 2015.09.10 |