【报错】springboot thymeleaf超链接跳转 404
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
<a th:href="register.html">注册</a>
错误写法2:
<a href="register.html">注册</a>
<a th:href="@{register}">注册</a>
@RequestMapping("/register")
public String toRegister(){
return "register";
}
注意:
1. 要用RequestMapping
2. application.properties中有关配置如下:
## thymeleaf spring.thymeleaf.mode=HTML5 spring.thymeleaf.encoding=UTF-8 spring.thymeleaf.servlet.content-type=text/html spring.thymeleaf.cache=false spring.thymeleaf.prefix=classpath:/templates/ spring.thymeleaf.suffix=.html spring.thymeleaf.check-template-location=true
【报错】springboot thymeleaf超链接跳转 404的更多相关文章
- idea中的springboot+gradle项目报错springboot configuration annotation processor not found in classpath
idea中的springboot项目,打开某个类run.halo.app.config.properties.HaloProperties.java,报错(使用gradle编译): springboo ...
- 关于springboot启动时候报错:springboot Failed to parse configuration class [Application]
把运行的java类放在一个package下后就不再提示这个错误. 使用的ide是intellij,之前也有因为没有创建package报错的经历,可能这是intellij必须的
- 为什么这个地方用重定向会报错.只能用 服务器跳转?? 为什么我加了过滤器,还是能直接登陆 servlet
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, ...
- springboot + thymeleaf静态资源访问404
在使用springboot 和thtmeleaf开发时引用静态资源404,静态资源结如下: index.html文件: <!DOCTYPE html> <html xmlns:th= ...
- spring boot + thymeleaf 报错 org.thymeleaf.exceptions.TemplateInputException
org.thymeleaf.exceptions.TemplateInputException: Error resolving template "admin/verifyPassword ...
- 【报错】The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
提交表单之后, 报错页面显示: HTTP Status 404 – 未找到 Type Status Report 消息 Not found 描述 The origin server did not f ...
- MySQL--18 报错总结
报错1: 报错原因:MySQL的socket文件目录不存在. 解决方法: 创建MySQL的socket文件目录 mkdir /application/mysql-5.6.38/tmp 报错2: 报错原 ...
- 【技术贴】解决支付宝充值信用卡还款跳转到网上银行报错Error 404 - Not Found
声明 : 本文在 GFDL 1.2 下发布,本文出处光大银行信用卡 http://bbs.090989.com/forum-186-1.html http://androidgao.blogspot ...
- Springboot解决资源文件404,503等特殊报错,无法访问
Springboot解决资源文件404,503等特殊报错 原文链接:https://www.cnblogs.com/blog5277/p/9324609.html 原文作者:博客园--曲高终和寡 ** ...
随机推荐
- 欧拉降幂公式 Super A^B mod C
Description Given A,B,C, You should quickly calculate the result of A^B mod C. (1<=A,C<=100000 ...
- ipsec概念理解
互联网安全协议(英语:Internet Protocol Security,缩写:IPsec): 本质上一个协议包,透过对IP协议的分组进行加密和认证来保护IP协议的网络传输协议族(一些相互关联的协议 ...
- MySQL技巧--伪哈希索引
哈希索引 哈希索引就是通过一个哈希函数计算出某个key的hash值,并以这个hash值去找到目标数据.例如:对于数据库的一行数据,对其主键进行hash运算,得到一个地址,这个地址指向这行记录的存储地址 ...
- SQL插入字段
//SQL插入字段 String dropTable="drop table if exists test;"; String columnGid ="alter tab ...
- webstorm 点击右上角运行run 启动vue项目
点击右上角框 -> 编辑结构 点击加号 新增一个npm项目 前提:node环境已经安装完成,npm包管理器 1.进行定位到项目的路径2.安装依赖包,npm install3.启动服务,npm r ...
- spring 知识结构
- JDK1.8 LinkedList双向链表源码
序言 LinkedList是一个双向链表 也就是说list中的每个元素,在存储自身值之外,还 额外存储了其前一个和后一个元素的地址,所以也就可以很方便地根据当前元素获取到其前后的元素 链表的尾部元素的 ...
- codeforces 868C - Qualification Rounds(构造)
原题链接:http://codeforces.com/problemset/problem/868/C 题意:有k个队伍参加比赛,比赛有n个预选的题目,有些队伍对已经事先知道了一些题目.问能不能选出若 ...
- window 连接服务器工具
Xshell xftp 下载网址 以上两个软件均免费, 只需要邮件激活即可. 其中 xshell 主要用来连接服务器,方便使用命令行.xftp 方便传输文件.
- 使用 Markdown 写博客
后台设置(左侧边栏区找到-设置默认编辑器). 设置为 Markdown 后保存,即可在编辑新博客时生效.