【报错】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 原文作者:博客园--曲高终和寡 ** ...
随机推荐
- 【转】uboot中的mmc命令
转自:https://www.cnblogs.com/yxwkf/p/3855383.html 1:mmcinfo 输入: mmcinfo 显示结果:Manufacturer ID: 45OEM: 1 ...
- hdu 1505 单调栈升级版
#include <bits/stdc++.h> #define PI acos(-1.0) #define mem(a,b) memset((a),b,sizeof(a)) #defin ...
- Redis 启动警告解决
Redis 启动警告解决[转] [root@centos224]# service redisd start 21985:M 24 Nov 04:07:20.376 * Increased maxim ...
- bzoj4819 [Sdoi2017]新生舞会 分数规划+最大费用最大流
题目传送门 https://lydsy.com/JudgeOnline/problem.php?id=4819 题解 首先上面说, \[ C = \frac{\sum\limits_{i=1}^n a ...
- 原生js禁止页面滚动
// 开启.禁止页面滚动 bodyScroll: { e(e) { e.preventDefault();// 注意此处代码片段必须这样提出来已保证传入下边两个事件的处理程序一样才生效,分别写到事件处 ...
- Python---进阶---文件操作---按需求打印文件的内容
一. 编写一个程序,当用户输入文件名和行数的时候,将该文件的前N行内容打印到屏幕上 input 去接收一个文件名 input 去接收一个行数 ----------------------------- ...
- C#与java的区别(继承,接口实现,指针,编译后形式,异常处理几个方面比较区别)
- mysql SELECT INTO语句 语法
mysql SELECT INTO语句 语法 作用:用于创建表的备份复件. 语法:SELECT * INTO new_table_name [IN externaldatabase] FROM ol ...
- 【bzoj1588】[HNOI2002]营业额统计
题目描述: 营业额统计 Tiger最近被公司升任为营业部经理,他上任后接受公司交给的第一项任务便是统计并分析公司成立以来的营业情况. Tiger拿出了公司的账本,账本上记录了公司成立以来每天的营业额. ...
- mac 外接屏幕切换操作
mac 屏幕小,可外接合适的屏幕扩展.接好屏幕后: 在 mac 系统变化中看到显示器字样, 点击排列,可以看到一个白色的条状色块,即为主屏幕.(镜像显示不能选中) 在 mac 怎么打开一个应用,在其中 ...