搞定了
以下随机 1-100
<p id="randomSentence" th:text="${T(java.lang.Math).random() * 100 + 1}"></p>

在上面的基础上取整
<p id="randomSentence" th:text="${T(java.lang.Math).floor(T(java.lang.Math).random() * 100) + 1}"></p>

9 天 后