New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
템플릿 파싱 에러 #11
Comments
안녕하세요!
에러로그만 보았을때 경로가 잘못되어 파싱이 이루어지지 않는것으로 보입니다.
templates//board/list.html
슬러쉬('/')가 두번 연속 들어가 있는데요. 컨트롤러에서 반환하는 슬러쉬를 삭제해 보세요.
"/board/list" => "board/list"
혹시, 그래도 안되면 다시 답장주세요!
2020년 5월 26일 (화) 오전 10:32, Mark Kim <notifications@github.com>님이 작성:
… 안녕하세요 김영재님
"처음 배우는 스프링 부트2" 를 보고 따라하다가 에러를 해결하지 못해 질문드립니다.
114 페이지를 보면 "예제 4-12" 에서 list.html 파일이 나오는데요
웹서버를 구동하고 http://localhost:8080/board/list 로 접속을 하면
다음과 같은 에러가 발생합니다.
There was an unexpected error (type=Internal Server Error, status=500).
An error happened during template parsing (template: "class path resource
[templates//board/list.html]";)
org.thymeleaf.exceptions.TemplateInputException: An error happened during
template parsing (template: "class path resource
[templates//board/list.html]";)
Caused by: org.attoparser.ParseException: Error resolving template
[layout/header], template might not exist or might not be accessible by any
of the configured Template Resolvers (template: "/board/list" - line 10,
col 6)
에러 내용을 읽어보면
부분을 처리하지 못해 에러가 나는것 같은데 저자님의 깃허브에 올라와 있는 코드를 그대로 복붙해도 여전히 에러가 발생하고 있습니다.
어떻게 하면 해결할 수 있을까요?
출처: https://haviyj.tistory.com/guestbook [What do you want?]
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#11>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADYAFE5BIL4EV3BD4HN474LRTML4DANCNFSM4NJ4NK5Q>
.
|
안녕하세요, 답변주셔서 감사합니다. 답변 주신걸 보고 컨트롤러 메소드의 리턴 부분을 에러 내용은 어제처럼 다음은 list.html 파일의 경로와 컨트롤러의 코드입니다 @controller public BoardController(BoardService boardService) { @GetMapping({"", "/"}) @GetMapping({"/list"}) |
https://github.com/young891221/Spring-Boot-Community-Web/blob/master/src/main/resources/templates/board/list.html
경로가 위와 같이 '/src/main/resources/templates/board/list.html'에 있는지 확인해 주세요. 만약,
그래도 안된다면 깃헙에 올려서 주소를 알려주시면 제가 찾아볼게요.
에러코드상으로는 경로 명확해 보이는데 이건 쓰는 IDE에 따라 달라질 수도 있을것 같네요.
2020년 5월 26일 (화) 오후 2:04, Mark Kim <notifications@github.com>님이 작성:
… 안녕하세요, 답변주셔서 감사합니다.
답변 주신걸 보고 컨트롤러 메소드의 리턴 부분을 봤는데요,
return "board/form"; 로 했을때랑
return "/board/form"; 로 했을때
두 경우 모두 똑같은 에러 메시지를 보여주고 있습니다.
에러 내용은 어제처럼
[THYMELEAF][http-nio-8080-exec-1] Exception processing template
"board/list": An error happened during template parsing (template: "class
path resource [templates/board/list.html]")
org.thymeleaf.exceptions.TemplateInputException: An error happened during
template parsing (template: "class path resource
[templates/board/list.html]")
Error resolving template [/layout/header], template might not exist or
might not be accessible by any of the configured Template Resolvers
(template: "board/list" - line 10, col 6)
인데요... 어느 부분을 확인해보면 에러를 고칠 수 있을까요??
(제가 아까 남긴 이슈의 에러 로그에서 왜 슬래시가 두개로 표시되는지는 모르겠습니다 ㅠ 재현도 되지 않네요...)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADYAFEY62RKNVNGMU2KRFODRTNEUXANCNFSM4NJ4NK5Q>
.
|
프로젝트 경로 안에 스태틱 리소스가 없어서 나는 에러였습니다. |
안녕하세요 김영재님
"처음 배우는 스프링 부트2" 를 보고 따라하다가 에러를 해결하지 못해 질문드립니다.
114 페이지를 보면 "예제 4-12" 에서 list.html 파일이 나오는데요
웹서버를 구동하고 http://localhost:8080/board/list 로 접속을 하면
다음과 같은 에러가 발생합니다.
There was an unexpected error (type=Internal Server Error, status=500).
An error happened during template parsing (template: "class path resource [templates//board/list.html]";)
org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates//board/list.html]";)
Caused by: org.attoparser.ParseException: Error resolving template [layout/header], template might not exist or might not be accessible by any of the configured Template Resolvers (template: "/board/list" - line 10, col 6)
에러 내용을 읽어보면
부분을 처리하지 못해 에러가 나는것 같은데 저자님의 깃허브에 올라와 있는 코드를 그대로 복붙해도 여전히 에러가 발생하고 있습니다. 어떻게 하면 해결할 수 있을까요?출처: https://haviyj.tistory.com/guestbook [What do you want?]
The text was updated successfully, but these errors were encountered: