Compare int and string in thymeleaf

Viewed 9762

I use thymeleaf 3 with spring boot 2

have a integer and a string to do a compare

i tried

${car.id}==${generic.value}"

but it's always false

1 Answers

This should help you: ${#strings.equals(generic.value, #strings.toString(car.id))}

Related