org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): cn.cyjt.shoot.mappe

The error content is as follows

Rerun updateInfoByUid()
cn.cyjt.shoot.mapper.UserMapperTests
updateInfoByUid(cn.cyjt.shoot.mapper.UserMapperTests)
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): cn.cyjt.shoot.mapper.UserMapper.updateInfoByUid

	at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:235)

	at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:53)

	at org.apache.ibatis.binding.MapperProxy.lambda$cachedInvoker$0(MapperProxy.java:115)

	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)

	at org.apache.ibatis.binding.MapperProxy.cachedInvoker(MapperProxy.java:102)

	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85)

	at com.sun.proxy.$Proxy77.updateInfoByUid(Unknown Source)

	at cn.cyjt.shoot.mapper.UserMapperTests.updateInfoByUid(UserMapperTests.java:67)
	。。。。。

problem causes:

绑定异常:无效的绑定语句(未找到):cyjt.拍摄.mapper.UserMapper.updateInfoByUid

Solution:

The sql statement is missing in the mapper.xml file in the resource directory, just
fill it up.
Such as:

<!-- 更新用户的个人资料 -->
  <!-- Integer updateInfoByUid(User user) -->
  <update id="updateInfoByUid">
    UPDATE
      t_user
    SET
      gender=#{gender},
      phone=#{phone},
      email=#{email},
      modified_user=#{modifiedUser},
      modified_time=#{modifiedTime}
    WHERE 
      uid=#{uid}
  </update>

Guess you like

Origin blog.csdn.net/weixin_44182157/article/details/109157982