【发布时间】:2017-01-14 07:31:35
【问题描述】:
我正在尝试使用 Spring Boot 和 Thymeleaf 运行示例。我得到了那个错误:
出现意外错误(类型=内部服务器错误, 状态=500)。无法执行从旧版 HTML 到 XML 的转换: nekoHTML 库不在类路径中。 nekoHTML 1.9.15 或更新版本是 在“LEGACYHTML5”模式下处理模板时需要
这些是我的依赖项:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
</dependency>
<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.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity4</artifactId>
<version>2.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
这是我的应用程序属性:
spring.thymeleaf.cache=false
spring.thymeleaf.suffix=.html
spring.thymeleaf.mode=LEGACYHTML5
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.content-type=text/html
当我添加 Neko HTML 依赖时,错误消失了。但是,它应该通过我当前的依赖项包含在内。可能是什么问题?
【问题讨论】:
标签: java spring spring-mvc spring-boot thymeleaf