servlet-context.xml ( 기본 설정 추가 )
페이지 정보
작성자 관리자 작성일 24-07-16 12:44 조회 142 댓글 0본문
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.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-4.3.xsd">
<!-- 컨트롤러 @RequestMapping() 경로를 바탕으로 "/WEB-INF/views/매핑 값.jsp"로 보낸다는 구조 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp" />
</bean>
<!-- 클래스 선언에 에노테이션을 이용해서 컨트롤러를 작성할 수 있다는 선언 -->
<mvc:annotation-driven></mvc:annotation-driven>
<!-- CSS, JavaScript, image 파일과 같이 고정된 자원들의 위치를 의미 -->
<mvc:resources mapping="/**" location="/resources/" />
<context:component-scan base-package="com.pkt.controller" />
</beans>
댓글목록 0
등록된 댓글이 없습니다.