Do not speak English well. Thanks for your patient.
It works with xml file.
<mapper namespace="org.jacknie.mybatis.Functions"> <sql id="isBlank"> <bind name="isBlank" value=":[@ org.apache.commons.lang3.StringUtils@isBlank (#this)]" /> </sql> <sql id="sysout"> <bind name="sysout" value=":[@ System@out.println (#this)]" /> </sql> </mapper>
It displays an XML file.
<mapper namespace="org.jacknie.test.TestMapper"> <select id="selectTest" resultType="_int"> <include refid="org.jacknie.mybatis.Functions.isBlank" /> <include refid="org.jacknie.mybatis.Functions.sysout" /> SELECT '1' FROM DUAL <if test="#fn = isBlank, not(#fn(map.name))"> <bind name="forLogging" value="#fn = sysout, #fn('Hello' + map.name)" /> </if> </select> </mapper>
How about the thought of this advice ...
enter the link here
Hyeongi jeong
source share