出现错误:

Failed to load resource: the server responded with a status of 404 ()

但是其他页面正常显示:

原因:

浏览器看一下: 

点开 看一下 请求链接:

Request URL: http://localhost:8080/emp/asserts/css/bootstrap.min.css 
 
明显 加了 请求关键字 emp 了. 
 
但是我们的资源路径全部放在 static 应该没有问题,拦截器如果存在问题,那其他页面也不可能正常显示<
 
 

处理办法:

加上反斜杠

  <script type="text/javascript" src="/asserts/js/jquery-3.2.1.slim.min.js"></script>
<script type="text/javascript" src="/asserts/js/popper.min.js"></script>
<script type="text/javascript" src="/asserts/js/bootstrap.min.js"></script>

或者使用thymeleaf @{}处理

 <script type="text/javascript" src="asserts/js/feather.min.js" th:src="@{/asserts/js/feather.min.js}"></script>

Spring Boot Failed to load resource: the server responded with a status of 404 ()的更多相关文章

  1. jsp中引入jquery报错:Failed to load resource: the server responded with a status of 404 (Not Found)

    问题描述: 今天自己在搭建spring.springMVC.hibernate框架,搭建完成后,在引入jquery时,发现jquery不管用.我的解决顺序是: 1.检查路径,发现路径没错,另外需要注意 ...

  2. 报错解决——Failed to load resource: the server responded with a status of 404 (Not Found) favicon.ico文件找不到

    Django项目开发完成后在本地运行没问题,但在推到服务器上后出现报错Failed to load resource: the server responded with a status of 40 ...

  3. 待解决:2bootstrap-cerulean.css Failed to load resource: the server responded with a status of 404 ()

    2bootstrap-cerulean.css Failed to load resource: the server responded with a status of 404 ()

  4. Failed to load resource: the server responded with a status of 404 (Not Found)

    Failed to load resource: the server responded with a status of 404 (Not Found) 报错情况:图标加载失败 原因分析:路径错误 ...

  5. ripple Failed to load resource: the server responded with a status of 404 (Not Found)

    在VS2015中使用Cordova + typescript开发中,遇到个问题. 在javascript console 中提示: Failed to load resource: the serve ...

  6. springmvc Failed to load resource: the server responded with a status of 404 (Not Found)

    jsp页面导入css.js提示上述问题. Spring对静态资源的请求做专门处理 <!-- 对静态资源的请求 --><mvc:resources location="/js ...

  7. SSM框架下 Failed to load resource: the server responded with a status of 404 (Not Found)错误

    这个错误提示的是js的引用路径有错: 1.检查应用路径是否正确(我的问题是路径是正确的但是去到页面就会提示404错误) 引用路径,最好都使用绝对路径 <script type="tex ...

  8. Failed to load resource: the server responded with a status of 404 (Not Found) favicon.ico文件找不到

      今天使用sublime以localhost方式打开html文件时(使用wamp环境提供一个Apache服务器,html文件存在于wamp环境的www文件夹下),出现favicon.ico文件找不到 ...

  9. glyphicons-halflings-regular.woff2:1 Failed to load resource: the server responded with a status of 404 (Not Found)解决Web部署 svg/woff/woff2字体 404错误

    问题:最近在IIS上部署web项目的时候,发现浏览器总是报找不到woff.woff2字体的错误.导致浏览器加载字体报404错误,白白消耗了100-200毫秒的加载时间. 原因:因为服务器IIS不认SV ...

随机推荐

  1. django初始化

    Django 版本 安装 pip安装 pip install django 安装最新版本的 pip install django==1.11.11 安装指定版本的 验证安装 直接去代码中调用djang ...

  2. 【Java】Java中的final关键字和static

    0.概述 final关键字表示是不可变的: 下面分别从属性(字段).方法.类中进行说明: 1.属性(or字段),表示常量 final声明在属性(or字段)中,表示常量,有两种初始化方法,1是在声明时直 ...

  3. Android Activity生命周期及启动模式

    曾经搞过许多东西,再熟练的东西一段时间没有碰都会生疏或忘记.后来体会到写成文档记录下来的重要性,但有些word或ppt记录下来的东西随着时间流逝会丢失,或者不愿去看.或许保存成博客的形式,会是更好的选 ...

  4. mysql查询出所有重复的记录

    假如我们有如下一张数据表(很简单,只是举例而已),表名为student.现在我们要取出其中重复记录.重复是以name相同为判定标准. ID name phone age 1 张三 10086 15 2 ...

  5. 关于token你需要知道的【华为云技术分享】

    版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/devcloud/article/detai ...

  6. echarts 堆叠柱状图 + 渐变柱状图

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  7. jQuery实现类似于购物车操作

    先看页面的代码,后面会详细写每一个操作的实现. <html> <head> <title>jQuery操作表格</title> <meta cha ...

  8. intellij idea使用tomcat maven plugin

    环境 java 1.8.0_111 tomcat tomcat-8.5.11 maven 3.2.5 intellij idea 14.0.3 命令行使用 建maven工程 mvn archetype ...

  9. Docker私有仓库搭建与界面化管理

    一.关于Registry 官方的Docker hub是一个用于管理公共镜像的好地方,我们可以在上面找到我们想要的镜像,也可以把我们自己的镜像推送上去. 但是有时候我们的使用场景需要我们拥有一个私有的镜 ...

  10. Windows基础

    目录 一. 硬件概述 二.常见硬件设备 三.文件系统 四. 文件类型和DOS命令 五 .批处理 六 .TCP/IP概述和Windows配置 七.网络设置.DNS.邮件★ 一. 硬件概述 1.计算机的发 ...