Spring的跨平台资源路径

时间:2018-11-15 09:33:23

标签: spring url configuration resources cross-platform

我想知道是否有可能在spring配置文件中指定将在基于Windows和Unix的操作系统上识别的资源url。

Windows操作系统从以下位置加载资源:

<parse-template location="templates\temp1.template" doc:name="Template TEMP1"/>

从以下位置加载基于Unix的操作系统上的相同资源:

<parse-template location="templates/temp1.template" doc:name="Template TEMP1"/>

区别在于Windows使用“ \”,而MACOS使用“ /”。

如何指定url,以便两个操作系统都支持它?

0 个答案:

没有答案