Parser-level comment blocks are code that will be simply removed from the template when thymeleaf parses them. They should look like this:
html
<!--/* This code will be removed at thymeleaf parsing time! */-->
Thymeleaf should remove absolutely everything between <!--/* and */-->, so these comment blocks can be used for displaying code when a template is statically open, knowing that it will be removed when thymeleaf processes it:
html
<!--/*-->
<div>
you can see me only before thymeleaf processes me!
</div>
<!--*/-->
This might come very handy for prototyping tables with a lot of <tr>'s, for example:
html
<table>
<tr th:each="x : ${xs}">
...
</tr>
<!--/*-->
<tr>
...
</tr>
<tr>
...
</tr>
<!--*/-->
</table>
该提问来源于开源项目:thymeleaf/thymeleaf