Spring 웹 개발 에서 의 응용
1559 단어 경험 공유백그라운드 프로 그래 밍학 량 설 JAVA
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
listener-class>
listener>
이 ContextLoader Listener 는 ServletContextListener 를 실현 합 니 다.이 listener 에서 서버 가 시 작 될 때 applicationContext 대상 을 실현 클래스 인 WebapplicationContext 이 고 대상 을 ServletContext 에 저장 합 니 다.(3)웹.xml 파일 에 applicationContext.xml 파일 의 위 치 를 설정 해 야 합 니 다.기본적으로 WEB-INF 디 렉 터 리 에서 applicationContext.xml 을 찾 습 니 다.applicationContext.xml 파일 이 기본 위치 에 없 으 면 웹.xml 파일 에서 설정 할 수 있 습 니 다.
param>
<param-name>contextConfigLocationparam-name>
<param-value>classpath:applicationContext.xmlparam-value>
param>
Classpath:applicationContext.xml 는 현재 프로젝트 의 클래스 경로 에서 applicationContext.xml 파일 을 찾 는 것 을 대표 합 니 다.contextConfigLocation 는 listener 에서 설명 하 는 상수 입 니 다.spring 프로필 의 위 치 를 설명 합 니 다.위 설정 을 통 해 웹 개발 에서 spring 프레임 워 크 를 사용 할 수 있 습 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Typora 간이 학습 노트, 기본 조작.1.1 컨텐츠 카탈로그 코드 1.4 무질서 목록 코드 코드 밑줄: ctrl + u** 굵게: **ctrl + u*기울임꼴: * ctrl + u삭제선: Alt + Shift + 5강조==内容== 2.1 단일 행 코드 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.