Thyme template engine (layout:decorate) doesn't load the template file in Spring Boot










0















I am struggling with making Thymeleaf load prepared Template fragments in Spring Boot into target webpage.



The index.html file doesn't load the template through decorate, even although I can include them directly via th:replace. I was following a tutorial but wasn't able to find a solution. I believe that the default template location should be resources/templates, which I am using. The html code is following:



index.html



<th:block layout:decorate="layout/layout" layout:fragment="content">

<!-- PAGE CONTENT -->
<div class="container" id="homePage">
<div>
<h1>Headline</h1>
bla <br />
<!--<span th:text="$article.title" /><br />
<span th:text="$article.title" /><br />-->
</div>
<div class="row">
<div class="col-lg-12">
<h2>This is Home Page</h2>
<div class="well">
I am inside a bootstrap well.
</div>
</div>
</div>
</div>
<!-- /.container -->
</th:block>


layout.html



<!DOCTYPE html>
<html lang="en">
<head>
<th:block th:replace="layout/fragments/head"></th:block>
</head>
<body>

<th:block th:replace="layout/fragments/nav"></th:block>
<!-- Page Content -->
<div layout:fragment="content" />
<!-- /.container -->
<th:block th:replace="layout/fragments/footer"></th:block>
</body>
</html>


head.html



 <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Spring Thymeleaf Dialect Configuration</title>
<!-- Bootstrap Core CSS -->
<link th:href="@/resources/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link th:href="@/resources/css/logo-nav.css" rel="stylesheet">
<script th:inline="javascript"> var contextRoot = /*[[@/]]*/ ''; </script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->


Folder Structure:



Maven project structure



Here are Maven dependencies:




http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0



<groupId>com.faire</groupId>
<artifactId>thyme2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>thyme2</name>
<description>Demo project for Spring Boot Thyme</description>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>

<dependencies>
<!--
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>

<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>

<!-- Bootstrap -->
<!-- https://mvnrepository.com/artifact/org.webjars/bootstrap -->
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>4.1.3</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.webjars.bower/jquery -->
<dependency>
<groupId>org.webjars.bower</groupId>
<artifactId>jquery</artifactId>
<version>3.3.1</version>
</dependency>


<!--<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>-->
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>




HTML output of index.html:



<!-- PAGE CONTENT -->
<div class="container" id="homePage">
<div>
<h1>Headline</h1>
bla <br />
<!--<span th:text="$article.title" /><br />
<span th:text="$article.title" /><br />-->
</div>
<div class="row">
<div class="col-lg-12">
<h2>This is Home Page</h2>
<div class="well">
I am inside a bootstrap well.
</div>
</div>
</div>
</div>
<!-- /.container -->


What am I missing?










share|improve this question




























    0















    I am struggling with making Thymeleaf load prepared Template fragments in Spring Boot into target webpage.



    The index.html file doesn't load the template through decorate, even although I can include them directly via th:replace. I was following a tutorial but wasn't able to find a solution. I believe that the default template location should be resources/templates, which I am using. The html code is following:



    index.html



    <th:block layout:decorate="layout/layout" layout:fragment="content">

    <!-- PAGE CONTENT -->
    <div class="container" id="homePage">
    <div>
    <h1>Headline</h1>
    bla <br />
    <!--<span th:text="$article.title" /><br />
    <span th:text="$article.title" /><br />-->
    </div>
    <div class="row">
    <div class="col-lg-12">
    <h2>This is Home Page</h2>
    <div class="well">
    I am inside a bootstrap well.
    </div>
    </div>
    </div>
    </div>
    <!-- /.container -->
    </th:block>


    layout.html



    <!DOCTYPE html>
    <html lang="en">
    <head>
    <th:block th:replace="layout/fragments/head"></th:block>
    </head>
    <body>

    <th:block th:replace="layout/fragments/nav"></th:block>
    <!-- Page Content -->
    <div layout:fragment="content" />
    <!-- /.container -->
    <th:block th:replace="layout/fragments/footer"></th:block>
    </body>
    </html>


    head.html



     <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Spring Thymeleaf Dialect Configuration</title>
    <!-- Bootstrap Core CSS -->
    <link th:href="@/resources/css/bootstrap.min.css" rel="stylesheet">
    <!-- Custom CSS -->
    <link th:href="@/resources/css/logo-nav.css" rel="stylesheet">
    <script th:inline="javascript"> var contextRoot = /*[[@/]]*/ ''; </script>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->


    Folder Structure:



    Maven project structure



    Here are Maven dependencies:




    http://maven.apache.org/xsd/maven-4.0.0.xsd">
    4.0.0



    <groupId>com.faire</groupId>
    <artifactId>thyme2</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>thyme2</name>
    <description>Demo project for Spring Boot Thyme</description>

    <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.0.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
    </properties>

    <dependencies>
    <!--
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    -->
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>

    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>

    <dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    </dependency>

    <!-- Bootstrap -->
    <!-- https://mvnrepository.com/artifact/org.webjars/bootstrap -->
    <dependency>
    <groupId>org.webjars</groupId>
    <artifactId>bootstrap</artifactId>
    <version>4.1.3</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.webjars.bower/jquery -->
    <dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>jquery</artifactId>
    <version>3.3.1</version>
    </dependency>


    <!--<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-test</artifactId>
    <scope>test</scope>
    </dependency>-->
    </dependencies>

    <build>
    <plugins>
    <plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    </plugin>
    </plugins>
    </build>




    HTML output of index.html:



    <!-- PAGE CONTENT -->
    <div class="container" id="homePage">
    <div>
    <h1>Headline</h1>
    bla <br />
    <!--<span th:text="$article.title" /><br />
    <span th:text="$article.title" /><br />-->
    </div>
    <div class="row">
    <div class="col-lg-12">
    <h2>This is Home Page</h2>
    <div class="well">
    I am inside a bootstrap well.
    </div>
    </div>
    </div>
    </div>
    <!-- /.container -->


    What am I missing?










    share|improve this question


























      0












      0








      0








      I am struggling with making Thymeleaf load prepared Template fragments in Spring Boot into target webpage.



      The index.html file doesn't load the template through decorate, even although I can include them directly via th:replace. I was following a tutorial but wasn't able to find a solution. I believe that the default template location should be resources/templates, which I am using. The html code is following:



      index.html



      <th:block layout:decorate="layout/layout" layout:fragment="content">

      <!-- PAGE CONTENT -->
      <div class="container" id="homePage">
      <div>
      <h1>Headline</h1>
      bla <br />
      <!--<span th:text="$article.title" /><br />
      <span th:text="$article.title" /><br />-->
      </div>
      <div class="row">
      <div class="col-lg-12">
      <h2>This is Home Page</h2>
      <div class="well">
      I am inside a bootstrap well.
      </div>
      </div>
      </div>
      </div>
      <!-- /.container -->
      </th:block>


      layout.html



      <!DOCTYPE html>
      <html lang="en">
      <head>
      <th:block th:replace="layout/fragments/head"></th:block>
      </head>
      <body>

      <th:block th:replace="layout/fragments/nav"></th:block>
      <!-- Page Content -->
      <div layout:fragment="content" />
      <!-- /.container -->
      <th:block th:replace="layout/fragments/footer"></th:block>
      </body>
      </html>


      head.html



       <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <meta name="description" content="">
      <meta name="author" content="">
      <title>Spring Thymeleaf Dialect Configuration</title>
      <!-- Bootstrap Core CSS -->
      <link th:href="@/resources/css/bootstrap.min.css" rel="stylesheet">
      <!-- Custom CSS -->
      <link th:href="@/resources/css/logo-nav.css" rel="stylesheet">
      <script th:inline="javascript"> var contextRoot = /*[[@/]]*/ ''; </script>
      <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
      <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
      <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
      <![endif]-->


      Folder Structure:



      Maven project structure



      Here are Maven dependencies:




      http://maven.apache.org/xsd/maven-4.0.0.xsd">
      4.0.0



      <groupId>com.faire</groupId>
      <artifactId>thyme2</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <packaging>jar</packaging>

      <name>thyme2</name>
      <description>Demo project for Spring Boot Thyme</description>

      <parent>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-parent</artifactId>
      <version>2.1.0.RELEASE</version>
      <relativePath/> <!-- lookup parent from repository -->
      </parent>

      <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
      <java.version>1.8</java.version>
      </properties>

      <dependencies>
      <!--
      <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-security</artifactId>
      </dependency>
      -->
      <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-thymeleaf</artifactId>
      </dependency>

      <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      </dependency>

      <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-devtools</artifactId>
      <optional>true</optional>
      </dependency>

      <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
      <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-data-jpa</artifactId>
      </dependency>

      <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      </dependency>

      <!-- Bootstrap -->
      <!-- https://mvnrepository.com/artifact/org.webjars/bootstrap -->
      <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>bootstrap</artifactId>
      <version>4.1.3</version>
      </dependency>

      <!-- https://mvnrepository.com/artifact/org.webjars.bower/jquery -->
      <dependency>
      <groupId>org.webjars.bower</groupId>
      <artifactId>jquery</artifactId>
      <version>3.3.1</version>
      </dependency>


      <!--<dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-test</artifactId>
      <scope>test</scope>
      </dependency>-->
      </dependencies>

      <build>
      <plugins>
      <plugin>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-maven-plugin</artifactId>
      </plugin>
      </plugins>
      </build>




      HTML output of index.html:



      <!-- PAGE CONTENT -->
      <div class="container" id="homePage">
      <div>
      <h1>Headline</h1>
      bla <br />
      <!--<span th:text="$article.title" /><br />
      <span th:text="$article.title" /><br />-->
      </div>
      <div class="row">
      <div class="col-lg-12">
      <h2>This is Home Page</h2>
      <div class="well">
      I am inside a bootstrap well.
      </div>
      </div>
      </div>
      </div>
      <!-- /.container -->


      What am I missing?










      share|improve this question
















      I am struggling with making Thymeleaf load prepared Template fragments in Spring Boot into target webpage.



      The index.html file doesn't load the template through decorate, even although I can include them directly via th:replace. I was following a tutorial but wasn't able to find a solution. I believe that the default template location should be resources/templates, which I am using. The html code is following:



      index.html



      <th:block layout:decorate="layout/layout" layout:fragment="content">

      <!-- PAGE CONTENT -->
      <div class="container" id="homePage">
      <div>
      <h1>Headline</h1>
      bla <br />
      <!--<span th:text="$article.title" /><br />
      <span th:text="$article.title" /><br />-->
      </div>
      <div class="row">
      <div class="col-lg-12">
      <h2>This is Home Page</h2>
      <div class="well">
      I am inside a bootstrap well.
      </div>
      </div>
      </div>
      </div>
      <!-- /.container -->
      </th:block>


      layout.html



      <!DOCTYPE html>
      <html lang="en">
      <head>
      <th:block th:replace="layout/fragments/head"></th:block>
      </head>
      <body>

      <th:block th:replace="layout/fragments/nav"></th:block>
      <!-- Page Content -->
      <div layout:fragment="content" />
      <!-- /.container -->
      <th:block th:replace="layout/fragments/footer"></th:block>
      </body>
      </html>


      head.html



       <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <meta name="description" content="">
      <meta name="author" content="">
      <title>Spring Thymeleaf Dialect Configuration</title>
      <!-- Bootstrap Core CSS -->
      <link th:href="@/resources/css/bootstrap.min.css" rel="stylesheet">
      <!-- Custom CSS -->
      <link th:href="@/resources/css/logo-nav.css" rel="stylesheet">
      <script th:inline="javascript"> var contextRoot = /*[[@/]]*/ ''; </script>
      <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
      <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
      <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
      <![endif]-->


      Folder Structure:



      Maven project structure



      Here are Maven dependencies:




      http://maven.apache.org/xsd/maven-4.0.0.xsd">
      4.0.0



      <groupId>com.faire</groupId>
      <artifactId>thyme2</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <packaging>jar</packaging>

      <name>thyme2</name>
      <description>Demo project for Spring Boot Thyme</description>

      <parent>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-parent</artifactId>
      <version>2.1.0.RELEASE</version>
      <relativePath/> <!-- lookup parent from repository -->
      </parent>

      <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
      <java.version>1.8</java.version>
      </properties>

      <dependencies>
      <!--
      <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-security</artifactId>
      </dependency>
      -->
      <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-thymeleaf</artifactId>
      </dependency>

      <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      </dependency>

      <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-devtools</artifactId>
      <optional>true</optional>
      </dependency>

      <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
      <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-data-jpa</artifactId>
      </dependency>

      <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      </dependency>

      <!-- Bootstrap -->
      <!-- https://mvnrepository.com/artifact/org.webjars/bootstrap -->
      <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>bootstrap</artifactId>
      <version>4.1.3</version>
      </dependency>

      <!-- https://mvnrepository.com/artifact/org.webjars.bower/jquery -->
      <dependency>
      <groupId>org.webjars.bower</groupId>
      <artifactId>jquery</artifactId>
      <version>3.3.1</version>
      </dependency>


      <!--<dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-test</artifactId>
      <scope>test</scope>
      </dependency>-->
      </dependencies>

      <build>
      <plugins>
      <plugin>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-maven-plugin</artifactId>
      </plugin>
      </plugins>
      </build>




      HTML output of index.html:



      <!-- PAGE CONTENT -->
      <div class="container" id="homePage">
      <div>
      <h1>Headline</h1>
      bla <br />
      <!--<span th:text="$article.title" /><br />
      <span th:text="$article.title" /><br />-->
      </div>
      <div class="row">
      <div class="col-lg-12">
      <h2>This is Home Page</h2>
      <div class="well">
      I am inside a bootstrap well.
      </div>
      </div>
      </div>
      </div>
      <!-- /.container -->


      What am I missing?







      spring-boot templates thymeleaf






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 13 '18 at 14:32







      Faire

















      asked Nov 13 '18 at 14:14









      FaireFaire

      118




      118






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Adding Layout Dialect resolved the problem:



           <dependency>
          <groupId> nz.net.ultraq.thymeleaf</groupId>
          <artifactId>thymeleaf-layout-dialect</artifactId>
          </dependency>


          I believed it is a part of spring-boot-starter-thymeleaf, but it seems the other way around.



          The html output after including dependency:





           <!DOCTYPE html>
          <html lang="en">
          <head>

          <meta charset="utf-8">
          <meta http-equiv="X-UA-Compatible" content="IE=edge">
          <meta name="viewport" content="width=device-width, initial-scale=1">
          <meta name="description" content="">
          <meta name="author" content="">
          <title>Spring Thymeleaf Dialect Configuration</title>
          <!-- Bootstrap Core CSS -->
          <link href="/resources/css/bootstrap.min.css" rel="stylesheet">
          <!-- Custom CSS -->
          <link href="/resources/css/logo-nav.css" rel="stylesheet">
          <script> var contextRoot = "/"; </script>
          <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
          <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
          <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
          <![endif]-->
          </head>
          <body>

          <!-- navigation --> <!-- inverse = white on black color schema, fixed top = always on the top (sticky would unhide when
          scrolling down -->
          <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
          <div class="container">
          <!-- Brand and toggle get grouped for better mobile display -->
          <div class="navbar-header">
          <!-- data-toggle - collapses target -->
          <button type="button" class="navbar-toggle" data-toggle="collapse" date-target="#bs-example-navbar-collapse-1">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="/">
          Spring ThymeLeaf
          </a>
          </div>
          <!-- Collect the nav links, forms, and other content for toggling -->
          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav">
          <li>
          <a href="/demoPage1">Demo Page 1</a>
          </li>
          <li>
          <a href="/demoPage2">Demo Page 2</a>
          </li>
          </ul>
          </div>
          <!-- /.navbar-collapse -->
          </div>
          <!-- /.container -->
          </nav>
          <!-- Page Content -->


          <!-- PAGE CONTENT -->
          <div class="container" id="homePage">
          <div>
          <h1>This is headline!</h1>
          bla <br />
          <!--<span th:text="$article.title" /><br />
          <span th:text="$article.title" /><br />-->
          </div>
          <div class="row">
          <div class="col-lg-12">
          <h2>This is Home Page</h2>
          <div class="well">
          I am inside a bootstrap well.
          </div>
          </div>
          </div>
          </div>
          <!-- /.container -->

          <!-- /.container -->
          <div>
          &copy; 2018 Faire
          <!-- jQuery -->
          <script src="/resources/js/jquery.js"></script>
          <!-- Bootstrap Core JavaScript -->
          <script src="/resources/js/bootstrap.min.js"></script>
          <!-- Bootstrap Core JavaScript -->
          <script src="/resources/js/custom.js"></script>
          </div>
          </body>
          </html>
          <div>
          &copy; 2018 Faire
          <!-- jQuery -->
          <script src="/resources/js/jquery.js"></script>
          <!-- Bootstrap Core JavaScript -->
          <script src="/resources/js/bootstrap.min.js"></script>
          <!-- Bootstrap Core JavaScript -->
          <script src="/resources/js/custom.js"></script>
          </div>









          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53282981%2fthyme-template-engine-layoutdecorate-doesnt-load-the-template-file-in-spring%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Adding Layout Dialect resolved the problem:



             <dependency>
            <groupId> nz.net.ultraq.thymeleaf</groupId>
            <artifactId>thymeleaf-layout-dialect</artifactId>
            </dependency>


            I believed it is a part of spring-boot-starter-thymeleaf, but it seems the other way around.



            The html output after including dependency:





             <!DOCTYPE html>
            <html lang="en">
            <head>

            <meta charset="utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <meta name="description" content="">
            <meta name="author" content="">
            <title>Spring Thymeleaf Dialect Configuration</title>
            <!-- Bootstrap Core CSS -->
            <link href="/resources/css/bootstrap.min.css" rel="stylesheet">
            <!-- Custom CSS -->
            <link href="/resources/css/logo-nav.css" rel="stylesheet">
            <script> var contextRoot = "/"; </script>
            <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
            <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
            <!--[if lt IE 9]>
            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
            <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
            <![endif]-->
            </head>
            <body>

            <!-- navigation --> <!-- inverse = white on black color schema, fixed top = always on the top (sticky would unhide when
            scrolling down -->
            <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
            <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
            <!-- data-toggle - collapses target -->
            <button type="button" class="navbar-toggle" data-toggle="collapse" date-target="#bs-example-navbar-collapse-1">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">
            Spring ThymeLeaf
            </a>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
            <li>
            <a href="/demoPage1">Demo Page 1</a>
            </li>
            <li>
            <a href="/demoPage2">Demo Page 2</a>
            </li>
            </ul>
            </div>
            <!-- /.navbar-collapse -->
            </div>
            <!-- /.container -->
            </nav>
            <!-- Page Content -->


            <!-- PAGE CONTENT -->
            <div class="container" id="homePage">
            <div>
            <h1>This is headline!</h1>
            bla <br />
            <!--<span th:text="$article.title" /><br />
            <span th:text="$article.title" /><br />-->
            </div>
            <div class="row">
            <div class="col-lg-12">
            <h2>This is Home Page</h2>
            <div class="well">
            I am inside a bootstrap well.
            </div>
            </div>
            </div>
            </div>
            <!-- /.container -->

            <!-- /.container -->
            <div>
            &copy; 2018 Faire
            <!-- jQuery -->
            <script src="/resources/js/jquery.js"></script>
            <!-- Bootstrap Core JavaScript -->
            <script src="/resources/js/bootstrap.min.js"></script>
            <!-- Bootstrap Core JavaScript -->
            <script src="/resources/js/custom.js"></script>
            </div>
            </body>
            </html>
            <div>
            &copy; 2018 Faire
            <!-- jQuery -->
            <script src="/resources/js/jquery.js"></script>
            <!-- Bootstrap Core JavaScript -->
            <script src="/resources/js/bootstrap.min.js"></script>
            <!-- Bootstrap Core JavaScript -->
            <script src="/resources/js/custom.js"></script>
            </div>









            share|improve this answer



























              0














              Adding Layout Dialect resolved the problem:



               <dependency>
              <groupId> nz.net.ultraq.thymeleaf</groupId>
              <artifactId>thymeleaf-layout-dialect</artifactId>
              </dependency>


              I believed it is a part of spring-boot-starter-thymeleaf, but it seems the other way around.



              The html output after including dependency:





               <!DOCTYPE html>
              <html lang="en">
              <head>

              <meta charset="utf-8">
              <meta http-equiv="X-UA-Compatible" content="IE=edge">
              <meta name="viewport" content="width=device-width, initial-scale=1">
              <meta name="description" content="">
              <meta name="author" content="">
              <title>Spring Thymeleaf Dialect Configuration</title>
              <!-- Bootstrap Core CSS -->
              <link href="/resources/css/bootstrap.min.css" rel="stylesheet">
              <!-- Custom CSS -->
              <link href="/resources/css/logo-nav.css" rel="stylesheet">
              <script> var contextRoot = "/"; </script>
              <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
              <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
              <!--[if lt IE 9]>
              <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
              <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
              <![endif]-->
              </head>
              <body>

              <!-- navigation --> <!-- inverse = white on black color schema, fixed top = always on the top (sticky would unhide when
              scrolling down -->
              <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
              <div class="container">
              <!-- Brand and toggle get grouped for better mobile display -->
              <div class="navbar-header">
              <!-- data-toggle - collapses target -->
              <button type="button" class="navbar-toggle" data-toggle="collapse" date-target="#bs-example-navbar-collapse-1">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              </button>
              <a class="navbar-brand" href="/">
              Spring ThymeLeaf
              </a>
              </div>
              <!-- Collect the nav links, forms, and other content for toggling -->
              <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
              <ul class="nav navbar-nav">
              <li>
              <a href="/demoPage1">Demo Page 1</a>
              </li>
              <li>
              <a href="/demoPage2">Demo Page 2</a>
              </li>
              </ul>
              </div>
              <!-- /.navbar-collapse -->
              </div>
              <!-- /.container -->
              </nav>
              <!-- Page Content -->


              <!-- PAGE CONTENT -->
              <div class="container" id="homePage">
              <div>
              <h1>This is headline!</h1>
              bla <br />
              <!--<span th:text="$article.title" /><br />
              <span th:text="$article.title" /><br />-->
              </div>
              <div class="row">
              <div class="col-lg-12">
              <h2>This is Home Page</h2>
              <div class="well">
              I am inside a bootstrap well.
              </div>
              </div>
              </div>
              </div>
              <!-- /.container -->

              <!-- /.container -->
              <div>
              &copy; 2018 Faire
              <!-- jQuery -->
              <script src="/resources/js/jquery.js"></script>
              <!-- Bootstrap Core JavaScript -->
              <script src="/resources/js/bootstrap.min.js"></script>
              <!-- Bootstrap Core JavaScript -->
              <script src="/resources/js/custom.js"></script>
              </div>
              </body>
              </html>
              <div>
              &copy; 2018 Faire
              <!-- jQuery -->
              <script src="/resources/js/jquery.js"></script>
              <!-- Bootstrap Core JavaScript -->
              <script src="/resources/js/bootstrap.min.js"></script>
              <!-- Bootstrap Core JavaScript -->
              <script src="/resources/js/custom.js"></script>
              </div>









              share|improve this answer

























                0












                0








                0







                Adding Layout Dialect resolved the problem:



                 <dependency>
                <groupId> nz.net.ultraq.thymeleaf</groupId>
                <artifactId>thymeleaf-layout-dialect</artifactId>
                </dependency>


                I believed it is a part of spring-boot-starter-thymeleaf, but it seems the other way around.



                The html output after including dependency:





                 <!DOCTYPE html>
                <html lang="en">
                <head>

                <meta charset="utf-8">
                <meta http-equiv="X-UA-Compatible" content="IE=edge">
                <meta name="viewport" content="width=device-width, initial-scale=1">
                <meta name="description" content="">
                <meta name="author" content="">
                <title>Spring Thymeleaf Dialect Configuration</title>
                <!-- Bootstrap Core CSS -->
                <link href="/resources/css/bootstrap.min.css" rel="stylesheet">
                <!-- Custom CSS -->
                <link href="/resources/css/logo-nav.css" rel="stylesheet">
                <script> var contextRoot = "/"; </script>
                <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
                <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
                <!--[if lt IE 9]>
                <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
                <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
                <![endif]-->
                </head>
                <body>

                <!-- navigation --> <!-- inverse = white on black color schema, fixed top = always on the top (sticky would unhide when
                scrolling down -->
                <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
                <div class="container">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                <!-- data-toggle - collapses target -->
                <button type="button" class="navbar-toggle" data-toggle="collapse" date-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/">
                Spring ThymeLeaf
                </a>
                </div>
                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                <li>
                <a href="/demoPage1">Demo Page 1</a>
                </li>
                <li>
                <a href="/demoPage2">Demo Page 2</a>
                </li>
                </ul>
                </div>
                <!-- /.navbar-collapse -->
                </div>
                <!-- /.container -->
                </nav>
                <!-- Page Content -->


                <!-- PAGE CONTENT -->
                <div class="container" id="homePage">
                <div>
                <h1>This is headline!</h1>
                bla <br />
                <!--<span th:text="$article.title" /><br />
                <span th:text="$article.title" /><br />-->
                </div>
                <div class="row">
                <div class="col-lg-12">
                <h2>This is Home Page</h2>
                <div class="well">
                I am inside a bootstrap well.
                </div>
                </div>
                </div>
                </div>
                <!-- /.container -->

                <!-- /.container -->
                <div>
                &copy; 2018 Faire
                <!-- jQuery -->
                <script src="/resources/js/jquery.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/bootstrap.min.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/custom.js"></script>
                </div>
                </body>
                </html>
                <div>
                &copy; 2018 Faire
                <!-- jQuery -->
                <script src="/resources/js/jquery.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/bootstrap.min.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/custom.js"></script>
                </div>









                share|improve this answer













                Adding Layout Dialect resolved the problem:



                 <dependency>
                <groupId> nz.net.ultraq.thymeleaf</groupId>
                <artifactId>thymeleaf-layout-dialect</artifactId>
                </dependency>


                I believed it is a part of spring-boot-starter-thymeleaf, but it seems the other way around.



                The html output after including dependency:





                 <!DOCTYPE html>
                <html lang="en">
                <head>

                <meta charset="utf-8">
                <meta http-equiv="X-UA-Compatible" content="IE=edge">
                <meta name="viewport" content="width=device-width, initial-scale=1">
                <meta name="description" content="">
                <meta name="author" content="">
                <title>Spring Thymeleaf Dialect Configuration</title>
                <!-- Bootstrap Core CSS -->
                <link href="/resources/css/bootstrap.min.css" rel="stylesheet">
                <!-- Custom CSS -->
                <link href="/resources/css/logo-nav.css" rel="stylesheet">
                <script> var contextRoot = "/"; </script>
                <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
                <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
                <!--[if lt IE 9]>
                <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
                <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
                <![endif]-->
                </head>
                <body>

                <!-- navigation --> <!-- inverse = white on black color schema, fixed top = always on the top (sticky would unhide when
                scrolling down -->
                <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
                <div class="container">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                <!-- data-toggle - collapses target -->
                <button type="button" class="navbar-toggle" data-toggle="collapse" date-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/">
                Spring ThymeLeaf
                </a>
                </div>
                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                <li>
                <a href="/demoPage1">Demo Page 1</a>
                </li>
                <li>
                <a href="/demoPage2">Demo Page 2</a>
                </li>
                </ul>
                </div>
                <!-- /.navbar-collapse -->
                </div>
                <!-- /.container -->
                </nav>
                <!-- Page Content -->


                <!-- PAGE CONTENT -->
                <div class="container" id="homePage">
                <div>
                <h1>This is headline!</h1>
                bla <br />
                <!--<span th:text="$article.title" /><br />
                <span th:text="$article.title" /><br />-->
                </div>
                <div class="row">
                <div class="col-lg-12">
                <h2>This is Home Page</h2>
                <div class="well">
                I am inside a bootstrap well.
                </div>
                </div>
                </div>
                </div>
                <!-- /.container -->

                <!-- /.container -->
                <div>
                &copy; 2018 Faire
                <!-- jQuery -->
                <script src="/resources/js/jquery.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/bootstrap.min.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/custom.js"></script>
                </div>
                </body>
                </html>
                <div>
                &copy; 2018 Faire
                <!-- jQuery -->
                <script src="/resources/js/jquery.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/bootstrap.min.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/custom.js"></script>
                </div>









                 <!DOCTYPE html>
                <html lang="en">
                <head>

                <meta charset="utf-8">
                <meta http-equiv="X-UA-Compatible" content="IE=edge">
                <meta name="viewport" content="width=device-width, initial-scale=1">
                <meta name="description" content="">
                <meta name="author" content="">
                <title>Spring Thymeleaf Dialect Configuration</title>
                <!-- Bootstrap Core CSS -->
                <link href="/resources/css/bootstrap.min.css" rel="stylesheet">
                <!-- Custom CSS -->
                <link href="/resources/css/logo-nav.css" rel="stylesheet">
                <script> var contextRoot = "/"; </script>
                <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
                <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
                <!--[if lt IE 9]>
                <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
                <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
                <![endif]-->
                </head>
                <body>

                <!-- navigation --> <!-- inverse = white on black color schema, fixed top = always on the top (sticky would unhide when
                scrolling down -->
                <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
                <div class="container">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                <!-- data-toggle - collapses target -->
                <button type="button" class="navbar-toggle" data-toggle="collapse" date-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/">
                Spring ThymeLeaf
                </a>
                </div>
                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                <li>
                <a href="/demoPage1">Demo Page 1</a>
                </li>
                <li>
                <a href="/demoPage2">Demo Page 2</a>
                </li>
                </ul>
                </div>
                <!-- /.navbar-collapse -->
                </div>
                <!-- /.container -->
                </nav>
                <!-- Page Content -->


                <!-- PAGE CONTENT -->
                <div class="container" id="homePage">
                <div>
                <h1>This is headline!</h1>
                bla <br />
                <!--<span th:text="$article.title" /><br />
                <span th:text="$article.title" /><br />-->
                </div>
                <div class="row">
                <div class="col-lg-12">
                <h2>This is Home Page</h2>
                <div class="well">
                I am inside a bootstrap well.
                </div>
                </div>
                </div>
                </div>
                <!-- /.container -->

                <!-- /.container -->
                <div>
                &copy; 2018 Faire
                <!-- jQuery -->
                <script src="/resources/js/jquery.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/bootstrap.min.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/custom.js"></script>
                </div>
                </body>
                </html>
                <div>
                &copy; 2018 Faire
                <!-- jQuery -->
                <script src="/resources/js/jquery.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/bootstrap.min.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/custom.js"></script>
                </div>





                 <!DOCTYPE html>
                <html lang="en">
                <head>

                <meta charset="utf-8">
                <meta http-equiv="X-UA-Compatible" content="IE=edge">
                <meta name="viewport" content="width=device-width, initial-scale=1">
                <meta name="description" content="">
                <meta name="author" content="">
                <title>Spring Thymeleaf Dialect Configuration</title>
                <!-- Bootstrap Core CSS -->
                <link href="/resources/css/bootstrap.min.css" rel="stylesheet">
                <!-- Custom CSS -->
                <link href="/resources/css/logo-nav.css" rel="stylesheet">
                <script> var contextRoot = "/"; </script>
                <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
                <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
                <!--[if lt IE 9]>
                <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
                <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
                <![endif]-->
                </head>
                <body>

                <!-- navigation --> <!-- inverse = white on black color schema, fixed top = always on the top (sticky would unhide when
                scrolling down -->
                <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
                <div class="container">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                <!-- data-toggle - collapses target -->
                <button type="button" class="navbar-toggle" data-toggle="collapse" date-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/">
                Spring ThymeLeaf
                </a>
                </div>
                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                <li>
                <a href="/demoPage1">Demo Page 1</a>
                </li>
                <li>
                <a href="/demoPage2">Demo Page 2</a>
                </li>
                </ul>
                </div>
                <!-- /.navbar-collapse -->
                </div>
                <!-- /.container -->
                </nav>
                <!-- Page Content -->


                <!-- PAGE CONTENT -->
                <div class="container" id="homePage">
                <div>
                <h1>This is headline!</h1>
                bla <br />
                <!--<span th:text="$article.title" /><br />
                <span th:text="$article.title" /><br />-->
                </div>
                <div class="row">
                <div class="col-lg-12">
                <h2>This is Home Page</h2>
                <div class="well">
                I am inside a bootstrap well.
                </div>
                </div>
                </div>
                </div>
                <!-- /.container -->

                <!-- /.container -->
                <div>
                &copy; 2018 Faire
                <!-- jQuery -->
                <script src="/resources/js/jquery.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/bootstrap.min.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/custom.js"></script>
                </div>
                </body>
                </html>
                <div>
                &copy; 2018 Faire
                <!-- jQuery -->
                <script src="/resources/js/jquery.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/bootstrap.min.js"></script>
                <!-- Bootstrap Core JavaScript -->
                <script src="/resources/js/custom.js"></script>
                </div>






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 14 '18 at 9:15









                FaireFaire

                118




                118



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53282981%2fthyme-template-engine-layoutdecorate-doesnt-load-the-template-file-in-spring%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    這個網誌中的熱門文章

                    How to read a connectionString WITH PROVIDER in .NET Core?

                    In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

                    Museum of Modern and Contemporary Art of Trento and Rovereto