Question: In my Thymeleaf template, I want to output the size of a list of objects. For example, for the list
the result should be 3. How is this possible using just Thymeleaf syntax?
You can use the following expression:
And just in case you want to check if the list is empty, there is also an easy method for that: