在Spring5,Springboot2的REST API中允许正斜杠?

时间:2018-07-10 12:27:09

标签: spring spring-boot

http://localhost:8080/ecart/orders/order////////////////////12345678//////////////

  

以上URI是否有效?   -在测试API时,我运行此表单的post-man客户端,它映射到下面的URI,没有多余的正斜杠

http://localhost:8080/ecart/orders/order/12345678/ ,并给出预期的结果。

  

我正在使用SpringBoot2,Spring 5来构建REST API。   有什么办法可以限制我们?

1 个答案:

答案 0 :(得分:1)

我有时也有同样的疑问,您可以检查this link来澄清这个话题。