好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

关于SpringBoot静态资源路径管理问题

一、默认静态资源路径

类路径下:

static public resources

这几个目录为默认静态资源访问的目录

 

二、增加静态资源路径前缀

动态资源和静态资源路径重复时会优先访问动态资源,为了避免路径重复,可以为静态资源路径增加前缀

1.目录结构

2.配置文件

spring:
mvc:
  static-path-pattern: /static_path/**

3.访问结果

到此这篇关于SpringBoot静态资源路径管理的文章就介绍到这了,更多相关SpringBoot静态资源路径内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!

原文链接:https://blog.csdn.net/weixin_43721000/article/details/124962868

查看更多关于关于SpringBoot静态资源路径管理问题的详细内容...

  阅读:16次