Spring 에러 (No Spring WebApplicationInitializer types detected on classpath)

Back-End/Problems 2019. 6. 5. 18:19
728x90
반응형

메모를 작성후 확인을 누르면 저장이 되어야되는데 저장이 되지 않음..



첫번째 오류 - Spring 에러 (No Spring WebApplicationInitializer types detected on classpath)



두번째 오류 -17:29:01.023 [http-nio-8090-exec-8] WARN [org.springframework.web.servlet.PageNotFound.noHandlerFound:1248]-

No mapping for GET /spring02/include/style.css



첫번째 오류 해결중







두번째 문제 (맵핑이 안됨) 해결


servlet-context.xml 내용중 일부


1
<resources mapping="/resources/**" location="/resources/" /> //리소스 맵핑을 하는 경로가 resources파일 내로 되어있는데
//css파일이 include파일 하위에 있어서 맵핑이 되지 않았었다.
//css파일을 resources파일 내부로 옮겨주었다.
cs
 

header.jsp 내용중 일부


1
<c:set var = "path" value = "${pageContext.request.contextPath}" /> <!-- 경로설정을 편하게하기 위함 (contextPath태그를 자주쓰니까 간단하고, 호출하기 편하게 path로 만들어놓음) -->
cs


1
<link rel = "stylesheet" href="${path}/resources/style.css" />  //css파일의 경로를 resources폴더 하위로 설정해준다.
cs


728x90
반응형
: