【发布时间】:2019-01-23 08:30:53
【问题描述】:
我使用 spring-boot-starter-thymeleaf 包将 Spring Boot Starter Parent 从 1.3.3.RELEASE 升级到了当前的 2.0.4.RELEASE。升级后属性 layout:decorator 不再起作用。该属性未解析,而是包含未解析,例如
<!DOCTYPE HTML>
<html
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="layouts/admin.layout">
<head>
<title>Admin</title>
</head>
<body>
pom.xml 包含在下面
<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>
Spring Boot Starter Parent 2.0.4.RELEASE 中是否对方言有更多要求?
【问题讨论】:
标签: java spring spring-boot thymeleaf