Intellij Thymeleaf syntax not working as expected

I am using the final version and the following code works fine. The problem is with bad highlights, as you can see below. Tested and didn't look like I needed additional plugins for this. Is there a way to get around this?

I am using the following line at the top of the html file page.

<html lang="en" xmlns:th="http://www.thymeleaf.org">

      

enter image description here

<div class="gifs container">
    <div class="row">
        <div th:each="gif : ${gifs}" class="col s12 l4">
            <a th:href="@{'/gif/' + ${gif.name}}">
                <img th:src="@{'/gifs/' + ${gif.name} + '.gif'}" />
                <a href="#" th:class="(${gif.favourite}? 'un':'') + 'mark favorite'"></a>
            </a>
        </div>
    </div>
 </div>

      

+3


source to share


1 answer


As far as I know, the Thymeleaf plugin cannot infer the type of gif and gif variables, since there is no communication between the controller adding the model parameter and the template itself. IntelliJ's thymeleaf integration works fine, denoted by th: not underlined: p



0


source







All Articles