I need help on plugin development

已回答

I'm developing a mybatis plugin, I have a problem when I try to implement following feature.

I have a mapper xml like bellow: 

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.foo.UserMapper">
    <select id="selectUsers" resultType="User">
        select id, username, password
        from users
       where id = #{user.id, jdbcType=INTEGER, javaType=int}
    </select>
</mapper>

IntelliJ inject SQL language to the XML text of 'select' tag automatically, that's what I need and it's great. And I develop a small custom language for the parameter expression (the 'user.id, jdbcType=int, javaType=any' part). Is there any way I can inject my custom parameter expression language to the SQL parameter again? (nested language injection?)

I tried to inject directly based on XmlText using MultiHostInjector, but then the SQL injection does not play well

0

请先登录再写评论。