V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
tyhuohuo8
V2EX  ›  问与答

mybatis 使用<include ><property/></include>组合向<sql>标签动态传递值程序出错?

  •  
  •   tyhuohuo8 · 2020-01-13 14:29:10 +08:00 · 1457 次点击
    这是一个创建于 1719 天前的主题,其中的信息可能已经有所发展或是发生改变。
    例子:
    <sql id="userColumns"> ${alias}.id,${alias}.username,${alias}.password </sql>
    <select id="selectUsers" resultType="map">
    select
    <include refid="userColumns"><property name="alias" value="t1"/></include>,
    <include refid="userColumns"><property name="alias" value="t2"/></include>
    from some_table t1
    cross join some_table t2
    </select>

    我代码中一使用<property>这个就一直循环报 Logging initialized using 'class org.apache.ibatis.logging.stdout.StdOutImpl' adapter.去除<property >,把<sql>里内容写死,就不会,这是什么原因?版本 mybatis-3.2.8;
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5090 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 07:17 · PVG 15:17 · LAX 00:17 · JFK 03:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.