th:style file injection issue @{}

Can anyone help? I get this warning:

'!', '!=', '%', '&#', '&&', '&gt;', '&lt;', '(', '*', '+', '+=', ',', '-', '.', '/', <, <=, <Literal>, <expression>, '==', '>', '>=', '?', '?.', '?:', IDENTIFIER, STRING_IDENTIFIER, and, div, empty, eq, ge, gt, le, lt, mod, ne, not, or, '|' or '||' expected, got '@{

 

on this piece of code.

<div class="bg-image" th:style="'background-image: url(' + @{/img/landing-background.jpg} + '); height: 70vh;'">

 

I'm using the latest intellij idea, spring and thymeleaf. The issue is at the @{ part. The program works fine and gets the image without any issues, is this a bug in the IDE or should i try and write this code in a different way? I'm fairly new to programming so help would be appreciated. Thanks 

 

 

请先登录再写评论。