参考链接: https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#inlining
<script th:inline="javascript"> $(function () { let topics = [[${topics}]] console.log(topics) }) </script>