V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
tyhuohuo8
V2EX  ›  问与答

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

  •  
  •   tyhuohuo8 · Jan 13, 2020 · 1724 views
    This topic created in 2306 days ago, the information mentioned may be changed or developed.
    例子:
    <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;
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5163 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 79ms · UTC 01:08 · PVG 09:08 · LAX 18:08 · JFK 21:08
    ♥ Do have faith in what you're doing.