如何将shiro principal的属性设置为百万富翁标签属性?

时间:2017-06-09 01:57:18

标签: thymeleaf shiro

我要求我使用shiro principal的属性作为百万富翁标签的属性。

我使用lib thymeleaf-extras-shiro,这样使用是真的。

<a>
    <shiro:principal property='imgUrl'/>
</a>

但我想将属性'imgUrl'设置为标签''属性'href'。

所以有人可以告诉我这件事吗? 谢谢。

1 个答案:

答案 0 :(得分:0)

我有一段时间没有看过thymeleaf-extras-shiro,但它可能是这样的:

<a href="${shiro.principal.imgUrl}"/>
// or maybe
<a href="${shiro.principal['imgUrl]'}"/>
相关问题