和属性文件中thymeleaf模板的配置相关

1、配置信息

spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html
spring.thymeleaf.mode=LEGACYHTML5
spring.thymeleaf.content-type=text/html
spring.thymeleaf.encoding=UTF-
spring.thymeleaf.cache=false
spring.thymeleaf.cache-period=
spring.template.cache=false

2、在spring mvc 的 controller中

@RequestMapping("/home")
public String home(Model model, HttpServletRequest req) {
  model.addAttribute("access_token", req.getParameter("access_token"));
return "home";
}

3、配置 + controller中必须为:

classpath:/templates/home   //classpath路径下的 templates包 下的 home.html文件

 

Thymeleaf 模板使用 Error resolving template "/home", template might not exist or might not be accessible by any of the的更多相关文章

  1. org.thymeleaf.exceptions.TemplateInputException: Error resolving template 报错

    org.thymeleaf.exceptions.TemplateInputException: Error resolving template报错 遇到二次,第一次是刚刚学的时候,都是一个原因,而 ...

  2. org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/ template might not exist or might not be accessible by any of the configured

    异常现象:在本地打包部署完全没有问题,资源文件也都可以映射上,但是打包成jar包部署到服务器上时,就一直报异常,异常信息如下: 严重: Servlet.service() for servlet [d ...

  3. org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/home/index2", template might not exist or might not be accessible by any of the configured Template Resolvers

    org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/home/index2", ...

  4. springboot报 org.thymeleaf.exceptions.TemplateInputException: Error resolving template "succeed";

    --------------------- 本文转自 林晓风 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/Lin_xiaofeng/article/details/ ...

  5. Error resolving template [xxx], template might not exist or might not be exist

    Springboot+thymeleaf+mybatis 抛Error resolving template [xxx], template might not exist的异常 原因是我们在pom. ...

  6. exception processing, template error resolving template

    错误信息:Exception processing template “/view/df”: Error resolving template “/view/df”, template might n ...

  7. Error resolving template,template might not exist or might not be accessible by any of the configured Template Resolvers

    template might not exist or might not be accessible by any of the configured Template Resolvers at o ...

  8. Thymeleaf 异常:Exception processing template "index": An error happened during template parsing (template: "class path resource [templates/index.html]")

    Spring Boot 项目,在 Spring Tool Suite 4, Version: 4.4.0.RELEASE 运行没有问题,将项目中的静态资源和页面复制到 IDEA 的项目中,除了 IDE ...

  9. template might not exist or might not be accessible by any of the configured Template Resolvers at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869)

    org.thymeleaf.exceptions.TemplateInputException: Error resolving template [code/leading], template m ...

随机推荐

  1. 使用 If-Then-Else 逻辑进行分支

    If-then-else 逻辑看似简单,功能却十分强大,它可以根据不同条件执行不同的操作.If-then-else 逻辑可理解为:如果某个条件为 true (IF),则执行某个操作:如果条件为 fal ...

  2. OpenJudge计算概论-数组逆序重放

    /*=============================================================== 数组逆序重放 总时间限制: 1000ms 内存限制: 65536kB ...

  3. [插件式开发][C#]

    Demo 下载 参考文章:https://www.cnblogs.com/hippieZhou/p/9398354.html 技术方面要使用到 依赖注入,可以参考此示例逐步学习:https://git ...

  4. ubuntu16上启用外部管理端口

    docker启动外部访问端口在Ubuntu上: [root@maintance systemd] $cd /lib/systemd/system/ [root@maintance system] $c ...

  5. 阶段5 3.微服务项目【学成在线】_day16 Spring Security Oauth2_15-认证接口开发-Redis配置

    4.2 Redis配置 4.2.1 安装Redis 1.安装Redis服务 下载Windows版本的redis:https://github.com/MicrosoftArchive/redis/ta ...

  6. Jmeter与BlazeMeter使用 录制导出jmx

    本文链接:https://blog.csdn.net/weixin_38250126/article/details/82629876JMeter 的脚本录制,除了自带的HTTP代理服务器以外,被大家 ...

  7. 使用python3脚本部署mariadb主从架构

    环境准备 一个脚本自动部署master服务 另一个部署slave服务 关闭主从节点的防火墙 以及事先设置好root远程登陆的权限. master import paramikossh=paramiko ...

  8. LeetCode_111. Minimum Depth of Binary Tree

    111. Minimum Depth of Binary Tree Easy Given a binary tree, find its minimum depth. The minimum dept ...

  9. Python中列表,元组,字典,集合的区别

    参考文档https://blog.csdn.net/Yeoman92/article/details/56289287 理解Python中列表,元组,字典,集合的区别 列表,元组,字典,集合的区别是p ...

  10. c-lodop的三个进程和一个服务介绍

    在windows任务管理器里,最新版可以看到有三个进程,例如安32位c-lodop的时候,有CLodopPrint32.exe.CLodopPrint32_backup.exe.CLodopServi ...