0
votes

I upgraded Spring Boot Starter Parent from 1.3.3.RELEASE to current 2.0.4.RELEASE using the spring-boot-starter-thymeleaf package. After the upgrade the attribute layout:decorator no longer work. The attribute is not parsed and is instead included unparsed e.g.

<!DOCTYPE HTML>
<html
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="layouts/admin.layout">
<head>
    <title>Admin</title>
</head>
<body>

The pom.xml is included below

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.j</groupId>
<artifactId>yggdrasil</artifactId>
<version>1</version>
<name>Yggdrasil</name>
<packaging>war</packaging>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.4.RELEASE</version>
</parent>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.7</java.version>
</properties>

<dependencies>
    <!-- Spring Boot -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <!-- Spring Boot Test -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>

    <!-- Spring Security -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>

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


    <!-- Web Jar libraries -->
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>jquery</artifactId>
        <version>2.1.4</version>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>bootstrap</artifactId>
        <version>3.3.2</version>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>bootswatch-sandstone</artifactId>
        <version>3.3.2</version>
    </dependency>

    <!-- WAR packaging -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-tomcat</artifactId>
        <scope>provided</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/log4j/log4j -->
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.17</version>
    </dependency>

    <!-- Local dependencies -->


    <dependency>
        <groupId>com.j</groupId>
        <artifactId>f</artifactId>
        <version>1</version>
    </dependency>


    <dependency>
        <groupId>com.j</groupId>
        <artifactId>bl</artifactId>
        <version>1.0</version>
    </dependency>


    <dependency>
        <groupId>com.j</groupId>
        <artifactId>dc</artifactId>
        <version>1.0</version>
    </dependency>


    <dependency>
        <groupId>com.j</groupId>
        <artifactId>ss</artifactId>
        <version>1</version>
    </dependency>


    <dependency>
        <groupId>com.j</groupId>
        <artifactId>ff</artifactId>
        <version>1</version>
    </dependency>

</dependencies>

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

        <!-- Tomcat plugin -->
        <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <url>SECRET</url>
                <server>Jengu Saturnus</server>
                <username>SECRET</username>
                <password>SECRET</password>
                <update>true</update>
                <systemProperties>
                    <spring.profiles.active>production</spring.profiles.active>
                </systemProperties>
            </configuration>
        </plugin>   
    </plugins>
    <finalName>${project.artifactId}</finalName>
</build>

Are there more requirements regarding dialect in the Spring Boot Starter Parent 2.0.4.RELEASE?

1

1 Answers

0
votes

Update: It seems as if the package nz.net.ultraq.thymeleaf.LayoutDialect is not added to the classpath via spring-boot-starter-thymeleaf? But when I added:

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

To the POM it loaded