private Float balance; 代码: <span class="A124_balance_num" th:text="${#numbers.formatDecimal(balance,1,'COMMA',2,'POINT')}"></span> balance=0 输出0.00 balance=325.12 输出325.12
thymeleaf中默认都是调用.toString()方法
转载自:https://blog.csdn.net/t518vs20s/article/details/100038716