static-locations

spring:
#  mvc:
#    static-path-pattern: /res/**
  web:
    resources:
      static-locations: [classpath: /haha]

- applicaiton.yml
spring-web-resources-static-locations 处理静态资源的访问路径。

Reason:

The elements [spring.web.resources.static-locations[0].classpath] were left unbound.

 官方文档中 classpath 路径为数组形式展示。

经测试发现无法正确解决此问题。

 发现使用 spring.resources.static-locations 并重启 Spring  Boot ,并不会报错但是仍然无法找到资源。

另一个问题:

favicon.ico 同样无法找到,浏览器报错 404 。

 

posted @   lvySharkereee  阅读(385)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
点击右上角即可分享
微信分享提示