ibatis 里出现错误 “could not find sql statement to include with refid xxx”

 java, mybatis  ibatis 里出现错误 “could not find sql statement to include with refid xxx”已关闭评论
4月 112022
 

ibatis 测试时出现错误提示:  “could not find sql statement to include with refid xxx” , 出现这种错误一般是下面两种情况引起:

  1. refid引用的sqlid不正确, 自己好好检查下。
  2. refid正确,但还是报错, 可能原因是: sql refid定义的位置必须在引用的语句之前,否则会出错。

 

DONE!