问题描述
把项目中用到的SpringBoot版本,由2.2.x升级到了2.7.x,发现原先可以访问到的路径:/springboot-demo/path//api,出现了异常,返回报错信息如下:
{
"timestamp": "2022-07-20T09:59:13.296+00:00",
"status": 404,
"error": "Not Found",
"path": "/springboot-demo/path//api"
}
解决
添加如下配置:
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
然后再访问同样的路径,恢复正常。
版权声明:本文为limenghua9112原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。