【发布时间】:2015-09-24 11:55:54
【问题描述】:
在我当前的 spring-boot 项目中,我实现了一个 AbstractTextChildModifierAttrProcessor 类来处理这样的标签:
<p get:property="xxx,yyy"></p>
它被处理成那个:
<p>zzz</p>
但现在我正在寻找类似的东西,但要与标签 th:if 和 <a> 一起使用,如下所示:
th:if="..."
和
<a th:href="..."></a>
自定义处理器应放置为标签的属性,并为该属性返回一个文本值。
有人可以给出关于如何做到这一点的提示,使用相同的处理器 AbstractTextChildModifierAttrProcessor 还是另一个?
【问题讨论】:
标签: spring attributes spring-boot thymeleaf processor