[Thymeleaf] 템플릿 파일명 오타로 인한 500 에러 발생

2023. 3. 6. 23:36프로그래밍

Jump to SpringBoot 실습중 500 에러가 발생했다.

 

공개된 소스와 비교를 해도 완전히 동일한 하고 question_detail.html 파일에는 문제가 없다.

500 Error 발생

하지만 에러를 좀더 확인해보면.. 

question_detail 에서 참고하는 form_errors 가 없거나 찾지 못한다는 에러 로그가 보인다.

500 에러가 발생했지만 원인은 다른 곳에

question_detail.html 파일이 참고하는 템플릿의 파일명이 잘못되어 발생했다.

form_errors.html 이 되어야 하지만 form_error.html 이라고 파일명 입력중 오타가 발생했다.

500 에러의 원인은 잘못된 파일명

STS 에서도 Problem 에 나타나지 않아 뭐가 에러 로그를 끝까지 확인하지 않고 대충 보고 지나서,

문제를 찾는데 시간이 더 걸렸다. 흑흑

 

https://github.com/cs7998/Jump-to-SpringBoot/commit/29a8394d721142ceea56eb2880f3eeac212bdf06

 

[Jump to SpringBoot][02][16] Fix TemplateInputException: Error resolv… · cs7998/Jump-to-SpringBoot@29a8394

…ing template [form_errors], template might not exist

github.com