applicationContext.xml 와 spring-servlet.xml 의 관계
1294 단어 SpringMVC
applicationContext.xml 는 응용 설정 으로 단독으로 사용 할 수 있 지만 spring-servlet.xml 는 applicationContext.xml 의 하위 용기 로 applicationContext.xml 정의 에서 초기 화 된 bean 을 참조 할 수 있 습 니 다.
application-context.xml 는 전역 적 이 며,여러 server let 에 적용 되 며,listener 와 함께 사용 합 니 다.웹.xml 에 서 는 다음 과 같이 설정 되 어 있 습 니 다.
org.springframework.web.context.ContextLoaderListener
contextConfigLocation
classpath*:applicationContext.xml
spring-mvc.xml 는 SpringMVC 응용 설정 입 니 다.웹.xml 에 서 는 다음 과 같이 설정 되 어 있 습 니 다.
springMVC
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
classpath:config/spring-mvc.xml
1
true
블 로그 참조:https://www.cnblogs.com/binlin1987/p/7053016.html
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
ssm 프레임워크 업로드 이미지 로컬 및 데이터베이스에 저장 예시본고는 ssm 프레임워크 업로드 이미지를 로컬과 데이터베이스에 저장하는 예시를 소개하고 주로 Spring+SpringMVC+MyBatis 프레임워크를 사용하여 ssm 프레임워크 업로드 이미지의 실례를 실현했다. 구체...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.