Springboot+thymeleaf+mybatis 抛Error resolving template [xxx], template might not exist的异常

原因是我们在pom.xml增加的以下内容导致的,以下内容中src/main/resources这项中没有把你的html文件包括进去,懒一点的做法(<include>**/*.*</include>),


<resources>
<resource>
<targetPath>${project.build.directory}/classes</targetPath>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.yml</include>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<targetPath>${project.build.directory}/classes</targetPath>
<directory>src/main/java</directory>
<includes>
<include>**/*.*</include>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
还有增加整段内容的目的是为了解决另一个问题,扫描不到mybatis的mapper.xml文件(在调用Mapper层方法时报错:Invalid bound statement (not found)),增加在最后面的<build></build>之间

 

 

Error resolving template [xxx], template might not exist or might not be exist的更多相关文章

  1. 异常:Error resolving template "xxx", template might not exist or might not be accessible...解决办法

    在开发环境下正常,但使用jar运行时,报错Error resolving template template might not exist or might not be accessible,意思 ...

  2. 【SpringBoot+Mybatis+thymeleaf报错】Error resolving template "XXX", template might not exist or might not be accessible by any of the configured

    解决方法一: 原因:在使用springboot的过程中,如果使用thymeleaf作为模板文件,则要求HTML格式必须为严格的html5格式,必须有结束标签,否则会报错. 在application.y ...

  3. 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 ...

  4. Error resolving template: template might not exist or might not be accessible是一句缩水报错?

    一 thymeleaf在开发的时候本地调试正常,但是在测试环境打成jar包就报这个错误了. 二 template might not exist or might not be accessible ...

  5. 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", ...

  6. 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 ...

  7. exception processing, template error resolving template

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

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

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

  9. 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 ...

随机推荐

  1. Interlij idea

    https://blog.csdn.net/qq_30180559/article/details/79146795 http://baijiahao.baidu.com/s?id=157736618 ...

  2. 团队作业5——《Spring_Four》项目需求改进与系统设计

    团队项目需求分析改进: 任务1: a.分析<基于Jsoup的大学生考试信息展示系统项目需求规格说明书>初稿的不足,特别是文档需求描述建模不完整的内容. 通过软件工程更深入的学习发现我们的需 ...

  3. 爬虫之scrapy扩展

    针对pipelines的扩展 from scrapy.exceptions import DropItem class CustomPipeline(object): def __init__(sel ...

  4. 如何自定义Django数据库中的字段

    新建完项目之后,想要自定义字段 # 创建一个自定义的字段 class MycharField(models.Field): def __inif__(self, max_lenth, *args, * ...

  5. (九)random、os、time、datetime、hashlib、pymysql、excel、sys、string相关模块

    1.random模块 1 import random,string 2 print(string.printable) #代表所有的 数字+字母+特殊字符 3 4 print(random.randi ...

  6. ofstream文件输出流把二进制数据写入文件

    #include <fstream> #include <sstream> using namespace std; //在实际应用中,根据需要的不同,选择不同的类来定义:如果 ...

  7. 重启虚拟机后dhclient进程未运行解决办法

    问题分析 重启虚拟机后,dhclient进程未运行的根因通常为: 1.NetworkManager未开启自启动导致的dhclient进程未运行 2.网卡设置未纳入NetworkManager管理导致的 ...

  8. HDU 1522 Marriage is Stable 稳定婚姻匹配

    http://acm.hdu.edu.cn/showproblem.php?pid=1522 #include<bits/stdc++.h> #define INF 0x3f3f3f3f ...

  9. Python基础-python流程控制之顺序结构和分支结构(五)

    流程控制 流程:计算机执行代码的顺序,就是流程 流程控制:对计算机代码执行顺序的控制,就是流程控制 流程分类:顺序结构.选择结构(分支结构).循环结构 顺序结构 一种代码自上而下执行的结构,是pyth ...

  10. 18-matlab知识点复习一

    clc; clear; %% 输出 clc, clear; fprintf('%.19f', pi); fprintf('%d', 110); inf pi disp([1,3,5]) disp('a ...