Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Ajax
- Oracle
- eGovFramework
- 오류
- 함수
- json
- JVM
- 정의
- eGov
- 과정평가형
- mybatis
- web.xml
- sql
- was
- controller
- 암호화
- CSS
- jQuery
- select
- POI
- array
- 개념
- 태그
- html
- javascript
- TO_DATE
- jsp
- spring
- input
- Java
Archives
- Today
- Total
web developer
[spring] servlet-context.xml 본문
728x90
728x90
servlet-context.xml 파일은 DispacherServlet의 기반 설정을 기록하는 파일이다.
<?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 https://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd">
<!--
servlet-context.xml(DispatcherServlet Context)
: DispatcherServlet의 기반 설정을 기록하는 파일
-->
<!-- 자바의 어노테이션 문법을 해석하게 하는 코드 (기본으로 등록되어있음) -->
<annotation-driven />
<!--
정적 자원(화면에 보여주기위한)을 매핑해 주는 코드(절대경로를 짧게 만들어주는 목적)
location 위치에 있는 것을 사용할 때 mapping처럼 사용하겠다.
-->
<resources mapping="/resources/**" location="/resources/" />
<!-- 뷰 리졸버 설정 -->
<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.spring.myapp" />
</beans:beans>
출처 : https://yeahajeong.tistory.com/49?category=957804
[SpringMVC] 초기 설정 - servlet-context.xml
servlservlet-context.xml 앞에서 servlet-context.xml 파일의 이름을 servlet-config.xml로 변경하였다. 이 파일은 DispacherServlet의 기반 설정을 기록하는 파일이다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16..
yeahajeong.tistory.com
728x90
728x90
'Framework > Spring [java]' 카테고리의 다른 글
[spring] 파일 관련 기능: 업로드, 다운로드, 게시글 등록 및 수정, 삭제 (0) | 2022.01.05 |
---|---|
[spring] Spring IOC, IOC Container ,DI 의미 (0) | 2021.12.23 |
[spring] web.xml (0) | 2021.12.23 |
[spring] root-context.xml (0) | 2021.12.23 |
[Spring] lombok 설정 (onMethod_ 에러발생) (0) | 2021.11.24 |