如何使用Thymleaf做到这一点? [英] How to do this using Thymleaf?

查看:191
本文介绍了如何使用Thymleaf做到这一点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我使用JSP的代码:

This is my code that is using JSP:

<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>

这就是我的尝试:

This is what I try:

<input type="hidden" name="${_csrf.parameterName}"  th:attr="value = ${_csrf.token}"/>

我不知道如何为html的名称赋值。

I dont know how to atributte a value to the name of the html.

推荐答案

这应该看起来像这样:

This should look like this:

<input type="hidden" th:name="${_csrf.parameterName}"  th:value="${_csrf.token}" />

美胸美属性列表

这篇关于如何使用Thymleaf做到这一点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆