I have this piece of code in my Thymeleaf template
<td class="col_name" th:text="${carPriceSummary.price} + € "></td>
But I got this error:
Could not parse as expression: "${carPriceSummary.price} + € "
Welcome to SO.
You may be better off using the utility method for currency that would include the appropriate symbol based on the locale:
<td class="col_name" th:text="${#numbers.formatCurrency(carPriceSummary.price)}">[price]</td>
but otherwise, adding the string representation would be a hacky way to do it:
<td class="col_name" th:text="${carPriceSummary.price} + ' €' ">[price]</td>
In either case, I would recommend including a default string like [price] so that it can be opened directly in a browser with the col_name class applied. This is a key strength to using Thymeleaf.
That's because € is not a valid expression. You'd at least need to make sure it's recognised as a string, ie put it in quotes.
I recommend the literal substitution format
th:text="|${carPriceSummary.price} € |"