所有Thymeleaf属性定义一个数字优先,建立他们的顺序执行的标签。这个顺序是:
| Order | Feature | Attributes |
|---|---|---|
| 1 | Fragment inclusion | th:includeth:replace |
| 2 | Fragment iteration | th:each |
| 3 | Conditional evaluation | th:ifth:unlessth:switchth:case |
| 4 | Local variable definition | th:objectth:with |
| 5 | General attribute modification | th:attrth:attrprependth:attrappend |
| 6 | Specific attribute modification | th:value, th:href, th:src, etc. |
| 7 | Text (tag body modification) | th:textth:utext |
| 8 | Fragment specification | th:fragment |
| 9 | Fragment removal | th:remove |