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 Spring Basics Using the MVC Architecture Code Two More Thymeleaf Templates

The code in the thymeleaf cannot be recognized by IDEA?

For example, there is a red underline of ${category.id} in my IDEA, although everything works well. I just wanna know why it cannot be recognized?

zlatkap
zlatkap
21,494 Points

At the top of the page in definititon of html add -> xmlns:th="http://www.w3.org/1999/xhtml" , next to thymeleaf like this:

<!DOCTYPE html> <html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:th="http://www.w3.org/1999/xhtml">

1 Answer

Alexander Nikiforov
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 Points

Thymeleaf template plugin support works only in IntellijIdea Ultimate 2016.2 (older versions had bug). If you have Community edition, it should not work. Paste a screenshot and intellijidea version, and what exactly error do you have.

https://www.jetbrains.com/help/idea/2016.1/thymeleaf.html