[Spring] Spring Explorer상에 Beans 폴더가 안 보일 때 (ClassNotFoundException)

2022. 12. 5. 14:46·🚀 from error to study/Java

 

 

 

 

환경설정을 한 뒤 프로젝트 우클릭 - Maven - Update Project 실행했더니

별안간 Beans 폴더가 사라짐

 

 

 

SEVERE: 클래스 [org.springframework.web.context.ContextLoaderListener]의 애플리케이션 리스너를 설정하는 중 오류 발생
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

콘솔에 찍히는 무한 빨간줄

 

 

 


 

 

 

보통 기본설정 문제로 아래 4가지 파일 중 범인이 있음
servlet_context.xml

root_context.xml

web.xml

pom.xml

 

 

실제로 나는 web.xml 파일의 servlet 태그에서 servlet-class 태그를 빼먹어 오류가 났음

아래 코드로 복붙 후 Update Project를 다시 해 보니 Beas 파일 살아남

	<servlet>
		<servlet-name>appServlet</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		
		<!-- DispatcherServlet 과 관련된 추가 설정에 대한 내용을 등록한 부분 -->
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup> <!-- DispatcherServlet이 읽어들여야 할 파일의 우선순위가 1순위 -->
	</servlet>
		
	<servlet-mapping>
		<servlet-name>appServlet</servlet-name>
		<url-pattern>/</url-pattern>
	</servlet-mapping>

 

살아난 Beans 폴더

저작자표시 비영리 변경금지 (새창열림)
'🚀 from error to study/Java' 카테고리의 다른 글
  • TO_CHAR(컬럼이름, 'FM0.0')을 이용해 별점 포맷 '★0.0' 소수점 1자리까지 나오게 하기
  • [JSTL] JSTL 구문 적용했을 때 CSS 안 먹힘
  • [Java] '<>' operator is not allowed for source level below 1.7
  • [STS] The archive: C:/dev/apache-tomcat-8.5.82/bin/bootstrap.jar which is referenced by the classpath, does not exist.
천재강쥐
천재강쥐
  • 천재강쥐
    디버거도 버거다
    천재강쥐
  • 전체
    오늘
    어제
    • Category (467)
      • 진짜 너무 궁금한데 이걸 나만 몰라...? (0)
      • 💾 Portfolio (2)
      • 🐤 CodingTest (28)
        • Java (20)
        • ᕕ(ꐦ°᷄д°᷅)ᕗ❌ (5)
      • 🚀 from error to study (142)
        • AI (1)
        • Cloud (2)
        • DB (12)
        • Front-End (16)
        • Github (14)
        • Java (39)
        • Mac (7)
        • Normal (29)
        • Server (22)
      • 📘 certificate (44)
        • 📘 리눅스마스터1급 (1)
        • 📘⭕️ 정보처리기사 (40)
        • 📘⭕️ SQLD (3)
      • 📗 self-study (234)
        • 📗 inflearn (35)
        • 📗 생활코딩 (8)
        • 📗 KH정보교육원 당산지원 (190)
      • 🎨 Scoop the others (0)
        • 📖 Peeking into other people.. (0)
        • 🇫🇷 (0)
        • 📘⭕️ 한국사능력검정시험 심화 (11)
        • 오블완 (4)
  • 인기 글

  • hELLO· Designed By정상우.v4.10.1
천재강쥐
[Spring] Spring Explorer상에 Beans 폴더가 안 보일 때 (ClassNotFoundException)
상단으로

티스토리툴바