기본 생성되는 servlet-context.xml 를 내 프로젝트 환경에 맞도록 변경해 보자.
0. 내 프로젝트 환경
- Tomcat 8.x / Open JDK 8.0 / Maria DB 10.x
1. Enables the Spring MVC @Controller programming model 에서 어노테이션 지원을 그대로 둠( 변경 사항 없음 )
2. Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory (변경 사항 없음)
3. Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory (변경 사항 없음)
4. <context:component-scan base-package="[controller있는 패키지 경로]" />
- 자동생성된 패키지 경로는 3레벨로 내 프로젝트 구조에 맞게 패키지 경로를 [Project Expolorer] 에서 변경하면 자동 변경됨
-------- 파일 첨부 관련 추가 내용 -------------
A1. 아래와 같이 파일 첨부 관련 설정을 추가함(p492)
<beans:bean id="multipartResolver"
class="org.springframework.web.multipart.support.StandardServletMultipartResolver">
</beans:bean>
'[B] Spring Note' 카테고리의 다른 글
10) ex04 프로젝트 - AOP (0) | 2018.12.04 |
---|---|
5) security-context.xml 설정하기 (0) | 2018.11.18 |
3) root-context.xml 를 내 프로젝트에 맞게 변경하기 (0) | 2018.11.14 |
2) web.xml 를 내 프로젝트에 맞게 변경하기 (0) | 2018.11.14 |
1) pom.xml 를 내 프로젝트에 맞게 변경하기 (0) | 2018.11.14 |