How to print Array size in thymeleaf?

后端 未结 2 590
感动是毒
感动是毒 2021-02-02 11:17

I\'m using Thymeleaf with spring mvc 4 but I have a problem when I want to print a list size

         


        
2条回答
  •  忘了有多久
    2021-02-02 12:13

    Besides the util method vphilipnyc described, instead of list.size, use list.size().

    When writing list.size, it's trying to call list.getSize() and an List (or a collection) doesn't have a getter named like this.

提交回复
热议问题