参考博客:https://blog.csdn.net/aosica321/article/details/68948915
https://blog.csdn.net/it_faquir/article/details/72510495
tiles.xml文件的写法:
tiles高级特性:https://yq.aliyun.com/ziliao/291868
<definition name="modal_template" template="/WEB-INF/ftl/common/layout/template/modal-template.html" templateType="freemarker"> </definition> <definition name="WILDCARD:/modal/*/*" extends="modal_template"> <put-attribute name="body" value="/WEB-INF/ftl/{1}/{2}.html" type="freemarker"/> </definition> <definition name="WILDCARD:/modal/*/*/*" extends="modal_template"> <put-attribute name="body" value="/WEB-INF/ftl/{1}/{2}/{3}.html" type="freemarker"/> </definition> <definition name="WILDCARD:/pc/*/*/*/*/*" extends="modal_template"> <put-attribute name="body" value="/WEB-INF/ftl/{1}/{2}/{3}/{4}/{5}.html" type="freemarker"/> </definition>
启用通配符,WILDCARD 当你view的名称为/modal/a/b 则会匹配到第一个,然后body里的html为/WEB-INF/ftl/a/b.html