相关疑难解决方法(0)

SpringMVC + Thymeleaf,错误消息是:模板可能不存在,或者任何已配置的模板解析器都可能无法访问

我已经阅读了其他答案,但无论如何,谢谢

弹簧:

<bean id="templateEngine" class="org.thymeleaf.spring3.SpringTemplateEngine">
    <property name="templateResolver" ref="templateResolver" />
</bean>

<bean class="org.thymeleaf.spring3.view.ThymeleafViewResolver">
    <property name="templateEngine" ref="templateEngine" />
    <property name="order" value="1" />
</bean>
Run Code Online (Sandbox Code Playgroud)

pom.xml中:

<dependency>
    <groupId>org.thymeleaf</groupId>
    <artifactId>thymeleaf</artifactId>
    <version>2.0.13</version>
</dependency>
<dependency>
    <groupId>org.thymeleaf</groupId>
    <artifactId>thymeleaf-spring3</artifactId>
    <version>2.0.13</version>
    <exclusions>
        <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </exclusion>
    </exclusions>
    <scope>compile</scope>
</dependency>
Run Code Online (Sandbox Code Playgroud)

org.thymeleaf.exceptions.TemplateInputException:解析模板"login.html"时出错,模板可能不存在或任何已配置的模板解析器可能无法访问

spring-mvc thymeleaf

12
推荐指数
2
解决办法
5万
查看次数

标签 统计

spring-mvc ×1

thymeleaf ×1