Required URI template variable 'companyId' for method parameter type Long is not present]
时间: 2023-12-31 20:39:49 浏览: 88
UriTemplate:PHP URI模板(RFC 6570)支持URI扩展和提取
根据引用\[1\]和引用\[2\]的内容,你遇到的问题是在调用接口路径时,缺少了必需的URI模板变量。具体来说,你使用了@PathVariable注解修饰的参数,但是在路径中没有包含该变量,导致出现了"Required URI template variable 'companyId' for method parameter type Long is not present"的错误信息。要解决这个问题,你需要确保路径中包含了该变量,并正确使用@PathVariable注解将URL中的占位符参数绑定到控制器处理方法的入参中。
#### 引用[.reference_title]
- *1* [SpringMVC报错Required URI template variable ‘a‘ for method parameter type String is not present](https://blog.csdn.net/wstever/article/details/128587331)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Required URI template variable ‘id‘ for method parameter type Integer is not present\r\n\ta..........](https://blog.csdn.net/weixin_44994494/article/details/117521063)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文