【发布时间】:2015-11-27 15:53:20
【问题描述】:
我想像这样处理对图像资源的请求:<img src="images?file=sub/path/to/myImage.jpg" />
键“images”是我本地硬盘上某处已安装资源的别名:/base/path/to/all/images
包含子目录sub/path/to
请求的图像在哪里myImage.jpg
位于。
所以完整的图片路径是:/base/path/to/all/images/sub/path/to/myImage.jpg
我尝试使用以下方法安装请求映射器:
public void WebApplication#mount(final IRequestMapper mapper) {...}
但我真的不明白该怎么做。
有人可以帮我吗?
【问题讨论】: