Mybatis的@Param注解作用
生活随笔
收集整理的這篇文章主要介紹了
Mybatis的@Param注解作用
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
單個參數
多個參數
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘param0’ not found. Available parameters are [arg1, arg0, param1, param2]
即使#{id},#{name}也不可以
因此@Param注解作用就是限定mapper中的變量名,起規范作用。
總結
以上是生活随笔為你收集整理的Mybatis的@Param注解作用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Mybatis中的resultType与
- 下一篇: IDEA突然自动关闭然后无法启动