Parameter '1' not found. Available parameters are [ew, param1]
时间: 2023-12-03 09:07:47 浏览: 40
As an AI language model, I am unable to provide a specific solution without more context about the issue. However, this error message suggests that the code is looking for a parameter named "1" which does not exist, and the only available options are "ew" and "param1". It is possible that the code needs to be revised to properly reference the correct parameter or define a parameter named "1".
相关问题
Parameter 'type' not found. Available parameters are [ew, param1]
在你的问题中,报错信息"Parameter 'type' not found. Available parameters are [ew, param1]"表示在你的代码中找不到名为"type"的参数。而可用的参数是"ew"和"param1"。根据引用,这个错误通常发生在mapper层与xml层的参数设置问题上。根据引用的说明,当mapper层方法传递多个参数时,必须为每个参数指定别名。根据引用的代码片段,你的mapper层方法应该是接收一个名为"param"的Map集合作为参数。所以,问题中的"type"参数可能在方法签名或XML文件中没有正确指定别名。你需要检查你的代码,确保将参数"type"正确地指定为"param"或其他别名。
Parameter 'id' not found. Available parameters are [ew, param1]
这个错误通常是因为在MyBatis的Mapper文件中没有正确地指定参数。在这个错误信息中,'id'参数没有被找到,而是找到了'ew'和'param1'参数。这可能是因为在Mapper文件中没有正确地指定参数名。解决这个问题的方法是在Mapper文件中正确地指定参数名。例如,如果你的Mapper文件中有一个方法叫做'getInboundDetailById',它需要两个参数'id'和'inboundLineNum',那么你应该这样写:
```java
InboundDetail getInboundDetailById(@Param("inbounddetailId") Long id, @Param("inboundLineNum") Long inboundLineNum);
```
这样就可以正确地指定参数名,避免出现这个错误。
相关推荐
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)