今天使用thymeleaf的碎片功能时一直报404,我一直以为我路径错了,但是仔细检查了好几次还是没用,
然后认为是浏览器缓存的问题,在配置中关闭缓存后同时清除浏览器缓存发现还是不行,纳闷了不会闹鬼了吧
郁闷的不行,然后在吃了包泡面的增益buff下,觉得可能是idea的target然后果断删了,果然成功了,哔了个狗;
<!DOCTYPE html> <html lang="en" xmlns:th="http://www.thymeleaf.org"> <head th:fragment="xhead(title)"> <meta charset="UTF-8"> <title th:text="${title}">后台登录</title> <meta name="renderer" content="webkit|ie-comp|ie-stand"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" /> <meta http-equiv="Cache-Control" content="no-siteapp" /> <base th:href="@{/}" th:src="@{/}"/> <!--<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />--> <link rel="stylesheet" th:href="@{/layui/css/font.css}"> <link rel="stylesheet" th:href="@{/layui/css/xadmin.css}"> <script type="text/javascript" th:src="@{/js/jquery.min.js}"></script> <script th:src="@{/layui/lib/layui/layui.js}" charset="utf-8"></script> <script type="text/javascript" th:src="@{/layui/js/xadmin.js}"></script> </head> </html>
原文地址:https://www.cnblogs.com/book-mountain/p/11615924.html
时间: 2024-10-08 07:31:56