Search code examples
javaspringspring-bootthymeleaf

Could not parse as expression


I'm new in Spring and Thymleaf.I'm having an issue when trying to transfer my object to template.Here's an error:

org.thymeleaf.exceptions.TemplateProcessingException: 
Could not parse as expression: "$(payments.comment)" (user/profile:13)

Could you help me a little bit. Thanks to all.

That is my GetMapper

That is my Thymleaf template


Solution

  • You are using parentheses:

    $(payments.comment)
    

    Use curly braces instead:

    ${payments.comment}
    

    Note that {} is not the same as ()