mybatis使用xml形式配置

以这个注解形式的查询代码为例

java 复制代码
   @Select("select * from emp where name like concat('%',#{name},'%') and gender =#{gender} and entrydate between #{begin} and #{end} order by  update_time desc ")
    public List<Emp> list(String name, Short gender, LocalDate begin,LocalDate end);

mybatis官网复制xml结构

这样就行了

相关推荐
前网易架构师-高司机5 天前
带标注的驾驶员安全带识别数据集,识别率99.5%,可识别有无系安全带,支持yolo,coco json,pascal voc xml格式
xml·yolo·数据集·交通·安全带
莫寒清5 天前
Mybatis的插件原理
面试·mybatis
逍遥德5 天前
Maven教程.01- settings.xml 文件<profile>使用详解
xml·java·maven
莫寒清6 天前
MyBatis 中动态 SQL 的作用
面试·mybatis
吹晚风吧6 天前
实现一个mybatis插件,方便在开发中清楚的看出sql的执行及执行耗时
java·sql·mybatis
码云数智-大飞6 天前
像写 SQL 一样搜索:dbVisitor 如何用 MyBatis 范式颠覆 ElasticSearch 开发
sql·elasticsearch·mybatis
逍遥德6 天前
Maven教程.03-如何阅读pom.xml文件
xml·java·后端·maven
Mr__Miss6 天前
mybatisPlus分页组件3.5.15版本报错解决方案
mybatis
无名-CODING6 天前
MyBatis中#{}和${}完全指南:从原理到实战
mybatis
松叶似针6 天前
Flutter三方库适配OpenHarmony【doc_text】— .docx 解析全流程:从 ZIP 解压到 XML 提取
xml·flutter·harmonyos