Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

thymeleaf not resolving pojo variable

I am using

IntelliJ IDEA 2016.2.1 Build #IU-162.1447.26, built on August 2, 2016

<title th:text="'giflib | ' + ${gif.name}">giflib</title>

gif name is showing as error (Can't resolve) and local host is throwing

There was an unexpected error (type=Internal Server Error, status=500). Error resolving template "gif=details", template might not exist or might not be accessible by any of the configured Template Resolvers

Does any one know how to get intellij to resolve the Thymeleaf dependency? I practically copied the instructor's project to test and I get same error.

Thanks

2 Answers

Judging from the Error you misspelled in some controller method return statemenet:

return "gif-details" with return "gif=details".

And because of that when Thymeleaf is trying to find "gif=details" in templates folder, it cannot.

It is unrelated to <title th:text="'giflib | ' + ${gif.name}">giflib</title>

Hi

I must have looked at the code for hours and I still did not catch it. Late hours can do this to a person.

Thank you for the resolving the issue.