• bind

    bind

    bind 元素可以从 OGNL 表达式中创建一个变量并将其绑定到上下文。比如:

    1. <select id="selectBlogsLike" resultType="Blog">
    2. <bind name="pattern" value="'%' + _parameter.getTitle() + '%'" />
    3. SELECT * FROM BLOG
    4. WHERE title LIKE #{pattern}
    5. </select>