Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 是否可以包含thymeleaf片段的格式_Java_Spring Mvc_Spring Boot_Thymeleaf - Fatal编程技术网

Java 是否可以包含thymeleaf片段的格式

Java 是否可以包含thymeleaf片段的格式,java,spring-mvc,spring-boot,thymeleaf,Java,Spring Mvc,Spring Boot,Thymeleaf,我正在寻找一种方法,将thymeleaf片段的结构包含到页面中。 我的意思是: <div class="container" th:fragment="container"> <div class="row"> {the content of the page continues here} </div> </div> fragmend的定义如下: <div class="container" th:frag

我正在寻找一种方法,将thymeleaf片段的结构包含到页面中。
我的意思是:

<div class="container" th:fragment="container">
    <div class="row">
        {the content of the page continues here}
    </div>
</div>
fragmend的定义如下:

<div class="container" th:fragment="container">
    <div class="row">
        {the content of the page continues here}
    </div>
</div>

{页面内容在此继续}
页面模板:

<div th:replace="fragments/main:: container">
    {I can continue here for eq, <div class="col-md-5"></div>}
</div>

{我可以在这里继续eq,}
我不知道这是否可行,但我正在寻找一种方法来做到这一点。

由于,这可以通过添加
到所需的布局,并将其用作视图中的父元素。

查找视图布局方言。