如何将网址映射到单个静态文件?

时间:2018-12-14 12:33:28

标签: spring spring-boot web

目前,静态目录“ resources”中有两个文件

-resources:
   index.hmtl
   picture.png

我要:

  1. 将网址“ ** \ resources \ picture.png ”映射到“ picture.png ”。

  2. 将所有其他前缀为“ ** \ resources \ ”的URL映射到“ index.html ”,例如,映射“ ** resources \ 1” “到“ index.html”。

有什么方法可以使用spring框架实现此功能吗?

0 个答案:

没有答案
相关问题