web开发中的常用跨域

interceptor的配置

mvc:maping 的path配置的通配符:

配置符 说明 举例 能匹配上的路径
? 匹配任何单字符 /api?hplegend /apiwhplegend;/apihhplegend
* 匹配0或者任意数量的字符 /api/* /api/hplegend;/api/legend
** 匹配0或者更多的目录 /api/** /api/hplegend;/api/hplegend/hp;

tip:”/api/“ 不能匹配上“/api/hplegend/hp”,只能匹配上“/api/hplegend” 。单个的“\” 不能匹配新的子uri路径,也就是说单个的“*”只能匹配字符但是不包括”/“子路径。