MyBatis 中mapper.xml文件中<sql>标签,<select>标签是使用

来源:互联网 发布:p2p运营数据分析 编辑:程序博客网 时间:2024/05/22 06:17

<sql> 和 <include>


<sql>用来封装SQL语句, <include>来调用


代码片段:<sql id="select">
SELECT * FROM `body_index`
</sql>

<select id="find" resultType="*" resultMap="*">
        <include refid="select"/>
    </select>

xml里面的表现:

阅读全文
0 0
原创粉丝点击