• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

7강 주소 페이지 Whitelabel Error Page

23.03.27 21:47 작성 조회수 2.55k

1

 안녕하세요 선생님

7강 도서 페이지 들어갈 때

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Sun Mar 26 19:37:03 KST 2023

There was an unexpected error (type=Not Found, status=404).

라고 오류가 뜨는데 주소도 문제 없고,

. ____ _

/\\ / ___'_ __ (_)_ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

\\/ ___)| |_)| | | | | || (_| | ) ) ) )

' |____| .__|_| |_|_| |_\__, | / / / /

=========|_|==============|___/=/_/_/_/

:: Spring Boot :: (v2.7.7)

2023-03-26 19:34:53.892 INFO 19636 --- [ main] c.g.libraryapp.LibraryAppApplication : Starting LibraryAppApplication using Java 11.0.17 on DESKTOP-Q6HP16E with PID 19636 (C:\libraryapp\library-app\library-app\out\production\classes started by 임수빈 in C:\libraryapp\library-app)

2023-03-26 19:34:53.897 INFO 19636 --- [ main] c.g.libraryapp.LibraryAppApplication : No active profile set, falling back to 1 default profile: "default"

2023-03-26 19:34:55.153 INFO 19636 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)

2023-03-26 19:34:55.168 INFO 19636 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]

2023-03-26 19:34:55.168 INFO 19636 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.70]

2023-03-26 19:34:55.314 INFO 19636 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext

2023-03-26 19:34:55.315 INFO 19636 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1345 ms

2023-03-26 19:34:55.669 INFO 19636 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''

2023-03-26 19:34:55.680 INFO 19636 --- [ main] c.g.libraryapp.LibraryAppApplication : Started LibraryAppApplication in 2.299 seconds (JVM running for 2.84)

2023-03-26 19:35:05.878 INFO 19636 --- [nio-8080-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'

2023-03-26 19:35:05.879 INFO 19636 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'

2023-03-26 19:35:05.880 INFO 19636 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms

 

파일 실행도 문제가 없는 것을 확인하였는데

오류 페이지 뜨는 이유가 있을까요?

답변 1

답변을 작성해보세요.

0

안녕하세요, 수빈님!! 질문 올려주셔서 감사드립니다! 🙏

제가 확인할 수 있는 내용으로는, 올려주신 것처럼

Sun Mar 26 19:37:03 KST 2023

There was an unexpected error (type=Not Found, status=404).

라는 내용인데요!! 여기서 404 라는 것은 우리가 접근하려 하는 페이지 또는 API를 찾지 못했다라는 것을 의미합니다! (HTTP 응답 상태코드에요!)

따라서 다음 경우를 확인해보시면 좋을 것 같습니다! 😊

[case 1. 접근하려는 주소가 잘못된 경우]

http://localhost:8080/v1/index.html 주소가 맞는지 확인해보시면 좋을 것 같습니다!

[case 2. 주소는 맞는데 파일이 없는 경우]

만약 다시 한 번 확인해보셨는데도 이 주소라면, 현재 아래 이미지처럼 static 파일이 있는지 확인해보시면 좋습니다! (src/main/resources/static/v1/index.html)

image

혹시나 스프링 프로젝트를 시작하는 두 번째 방법을 쓰셨다면, 새로운 프로젝트에는 static 폴더가 없기 때문에 <스프링 프로젝트를 시작하는 첫 번째 방법>을 사용하셔야 합니다!

자세한 내용은, 강의 준비 영상과 강의 자료를 참고해주시면 좋습니다!

image

꼭 해결되셨으면 좋겠습니다!

감사합니다!!! 🙇