<sql> 和 <include>


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


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

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

xml里面的表现:

MyBatis中 sql标签和include标签的使用MyBatis中 sql标签和include标签的使用

转载于:http://blog.csdn.net/baidu_31657889/article/details/52101130

相关文章: