美文网首页
mybatis 常用写法

mybatis 常用写法

作者: Kevin老师不迟到 | 来源:发表于2019-12-04 10:56 被阅读0次

1.mybatis mapper 中调用方法:
method
public void save(@Param("myParam") name )
xml
${myParam.method()}

2.调用公共sql
<sql id = "sqlid">
insert into ${table_name} (field1,field2...) values(value1,value2)
</sql>

引用部分
<select id = ....>
<include refid="sqlid">
<property name="commit_table_name" value="code_commit">
</include>
</select>

相关文章

网友评论

      本文标题:mybatis 常用写法

      本文链接:https://www.haomeiwen.com/subject/bsbkgctx.html