AWS EC2 Spring Boot ๋ฐฐํฌ ์ TemplateInputException ์ค๋ฅ
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception
[Request processing failed: org.thymeleaf.exceptions.TemplateInputException: Error resolving template [/ip/ipinfo],
template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause
EC2 ์๋ฒ์ ๋ฐฐํฌํ๋ ๋์ค TemplateInputException์ด ๋ฐ์ํ์ฟ๋ค. URL์ด ์๋ชป๋์๋ค๋ ์๋ฌ๊ฐ์๋ฐ application.properties๋ Controller๋ฅผ ์ฐพ์๋ด๋ ๋ฌธ์ ์ ์ด ์์๋ค. ๋ํ ๋ก์ปฌ์์๋ ์ ๋์๊ธฐ ๋๋ฌธ์ ์ด๋ฌํ ์ค๋ฅ๋ฅผ ์ฐพ์ง ๋ชปํ์๋ค. ๊ทธ๋์ ๊ตฌ๊ธ๋ง์ ํ๋ ๋์ค ๋์ ๋๊ฐ์ ๋ถ์ ์ฐพ์๋ค.
controller์์ return๊ฐ์ "/xxx"์ ๊ฐ์ ํํ๋ฅผ ์ ์ ๊ฒฝ์ฐ, ๋ฆฌ๋ ์ค๋ ์ด๋ฅผ ์ธ์ํ์ง ๋ชปํด ์๋ฌ๊ฐ ๋ฐ์ํ๊ณ ํ๋ฉด์ ์ ๊ทผํ์ง ๋ชปํ ์ ์๋ค.
๋ผ๊ณ ํ๋ค. ์ด์ ๋ถํฐ ๊ณ์ ์ค๋ฅ๋ฅผ ๋ชป์ฐพ๋ค๊ฐ ์ปจํธ๋กค๋ฌ์ return ํ ๋ ๋งจ ์์ /๋ฅผ ๋นผ๋ ๋ฐ๋ก ํด๊ฒฐ์ด ๋์๋ค.
'๐ ErrorNote' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๐ข [Spring] No converter found for return value of type: class java.lang.Boolean (0) | 2023.07.21 |
---|---|
๐ข [Spring] Spring ํธ๋์ญ์ ์ฒ๋ฆฌ ์ค Commit (0) | 2023.07.20 |