方法一:

**Mapping.xml

select * from login where name=#{0} and password=#{1} 

把参数修改为下标

方法二:

**Dao.java

public Login **(@param("name")String username,@param("pwd")String password);

name、pwd 是别名对应**Mapping.xml里面的

select * from login where name=#{name} and password=#{pwd} 

定义别名

原文:https://blog.csdn.net/baidu_35975930/article/details/80014087

相关文章:

  • 2021-04-12
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-03
  • 2021-12-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-16
相关资源
相似解决方案