国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

org.apache.ibatis.binding.BindingException: Parameter ‘status‘ not found.

這篇具有很好參考價(jià)值的文章主要介紹了org.apache.ibatis.binding.BindingException: Parameter ‘status‘ not found.。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

報(bào)錯(cuò)信息:

org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.apache.ibatis.binding.BindingException: Parameter 'status' not found. Available parameters are [arg2, arg1, arg0, param3, param1, param2]
### Cause: org.apache.ibatis.binding.BindingException: Parameter 'status' not found. Available parameters are [arg2, arg1, arg0, param3, param1, param2]

org.apache.ibatis.binding.BindingException: Parameter ‘status‘ not found.,java,開發(fā)語(yǔ)言

原因分析:

從控制層傳入的參數(shù),在mapper文件中接收時(shí),要使用@Param注解來(lái)進(jìn)行接收,否則就會(huì)不知道哪個(gè)參數(shù)傳的是哪個(gè)位置,如果方法中有多個(gè)參數(shù),需要使用@Param(SQL參數(shù)占位符名稱);

org.apache.ibatis.binding.BindingException: Parameter ‘status‘ not found.,java,開發(fā)語(yǔ)言

解決方案:

在原代碼的基礎(chǔ)上添加@Param注解

原mapper代碼:

    List<Brand> selectByconect(int status, String brandName, String companyName);

修改之后的mapper代碼:

List<Brand> selectByconect(@Param("status") int status, @Param("brandName") String brandName, @Param("companyName") String companyName);

修改完之后,成功獲取參數(shù)。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-652897.html

到了這里,關(guān)于org.apache.ibatis.binding.BindingException: Parameter ‘status‘ not found.的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 解決錯(cuò)誤:nested exception is org.apache.ibatis.binding.BindingException

    mybatis報(bào)錯(cuò)信息: Error: nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘categoryList’ not found. Available parameters are [arg0, collection, list] 網(wǎng)上搜到的解決辦法: 一、多個(gè)參數(shù)使用@Param注解標(biāo)識(shí) 對(duì)于多個(gè)參數(shù)的情況,mapper.java中用注解標(biāo)識(shí)參數(shù), mapper.xml中才能識(shí)別到其值

    2024年02月21日
    瀏覽(22)
  • nested exception is org.apache.ibatis.binding.BindingException 解決方式匯總

    MyBatis Mapper出現(xiàn)了nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘levelName’ not found. Available parameters are [arg2, arg1, arg0, param3, param1, param2],說(shuō)明是Mapper接口方法的參數(shù)在編譯的時(shí)候沒(méi)有按照代碼寫的參數(shù)來(lái)進(jìn)行。需要解決這個(gè)問(wèn)題,可以從以下方面入手。 從Java 1.8開

    2024年02月16日
    瀏覽(25)
  • 已解決org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.Bi

    已解決org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.Bi org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.Bi 對(duì)于org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException的錯(cuò)誤,一般是由于MyBatis配置問(wèn)題引起的。

    2024年02月08日
    瀏覽(29)
  • 已解決org.apache.ibatis.type.TypeException: Could not resolve type alias

    已解決org.apache.ibatis.type.TypeException: Could not resolve type alias org.apache.ibatis.type.TypeException: Could not resolve type alias 對(duì)于 org.apache.ibatis.type.TypeException: Could not resolve type alias 錯(cuò)誤,通常是由于 MyBatis 配置文件中配置的別名無(wú)法解析導(dǎo)致的。 下滑查看解決方法 解決方法如下: 首先,請(qǐng)

    2024年02月06日
    瀏覽(50)
  • idea運(yùn)行單元測(cè)試報(bào)Could not find method on interface org.apache.ibatis.executor.Executor named queryCursor

    出現(xiàn)上面的問(wèn)題是由于idea插件MyBatis Log EasyPlus導(dǎo)致產(chǎn)生的 直接關(guān)閉掉這個(gè)插件,就能正常運(yùn)行了 org.apache.ibatis.exceptions.PersistenceException:? ### Error opening session. ?Cause: org.apache.ibatis.plugin.PluginException: Could not find method on interface org.apache.ibatis.executor.Executor named queryCursor. Cause: java

    2024年04月28日
    瀏覽(15)
  • nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping錯(cuò)誤的決方法

    nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping錯(cuò)誤的決方法

    今天寫好 hive表導(dǎo)入的回調(diào) 的接口,如下代碼所示: 啟動(dòng) postman 訪問(wèn)該接口,確報(bào)出如下錯(cuò)誤: 即 nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property=\\\'missionId\\\', mode=IN, javaType=class java.lang.Long, jdbcType=null, numericScale=null, resultMapId=\\\'null\\\',

    2024年02月09日
    瀏覽(23)
  • BindingException: Parameter ‘ids‘ not found. Available parameters are [collection, list]

    BindingException: Parameter ‘ids‘ not found. Available parameters are [collection, list]

    記錄沒(méi)見過(guò)的Bug之BindingException 今天在寫一個(gè)刪除套餐功能時(shí)遇到個(gè)bug如下圖所示: 我們都知道當(dāng)一個(gè)請(qǐng)求參數(shù)有多個(gè)值接收時(shí)可以采用如下方式: ? ? ?? ? ? ? ? 1. 使用數(shù)組接收 ? Long[] ids ? ? ?? ? ? ? ? 2. 使用集合接收 ?ListLong ids ?注意: 如果使用集合需要添加@Re

    2023年04月17日
    瀏覽(27)
  • 【已解決】org.apache.ibatis.exceptions.PersistenceException

    【已解決】org.apache.ibatis.exceptions.PersistenceException

    本博文源于筆者自身學(xué)習(xí)的mybatis,在學(xué)習(xí)一對(duì)多的過(guò)程中,出現(xiàn)了一個(gè)錯(cuò)誤。這個(gè)錯(cuò)誤是org.apache.ibatis.exceptions.PersistenceException: Error building SqlSession. The error may exist in mappers/EmpMapper.xml The error occurred while processing mapper_resultMap[empAndDeptResultMapTwo]_association[dept] Cause: org.apache.ibatis

    2024年02月12日
    瀏覽(34)
  • MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException

    連不上數(shù)據(jù)庫(kù)?。?! 檢查配置項(xiàng)是否錯(cuò)誤! 127.0.0.1 漏了個(gè)1

    2024年02月13日
    瀏覽(45)
  • 完美解決org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflec

    已解決org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflec 下滑查看解決方法 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflec org.mybatis.spring.MyBatisSystemException是MyBatis與Spring集成時(shí)可能出現(xiàn)的異常,主要原因是在MyBatis的配置或使用過(guò)程中出現(xiàn)了

    2024年02月15日
    瀏覽(25)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包