Spring boot默认静态资源访问方式

定义: server.servlet-path= # Context path of the application. 应用的上下文路径,也可以称为项目路径,是构成url地址的一部分。

Spring boot默认对/**的访问可以直接访问四个目录下的文件:

    classpath:/public/
    classpath:/resources/
    classpath:/static/
    classpath:/META-INFO/resouces/

猜你喜欢

转载自blog.csdn.net/lidongliangzhicai/article/details/94959412