2016-11-28 84 views
4

我想提取th​​ymeleaf模板中的url属性。我想这样的:Thymeleaf获取url属性

发送查询 http://somedomain/myPage?text=blah

myPage.html下

<div th:text="${param.text}"></div> 

卜,而不是等等我得到[Ljava.lang.String;@797291bb

回答

4

${param.text}解析为阵列。要获得实际值,您必须使用${param.text[0]}