반응형
  • sql로 선언된 sql문을 include 하고 거기에 parameter를 넘길 수 있을까?
    • 안됨
    • 대신 property를 활용해서 넘기자

<sql id="myinclude">
  from ${myproperty}
</sql>

<include refid="myinclude">
  <property name="myproperty" value="tablename"/>
</include>

  • myproperty 에 tablename 값이 들어감 (함수 인자 아님)
    • $ 주의


반응형

'java' 카테고리의 다른 글

[jdbc][mysql] warn ssl connection  (0) 2018.11.23
[java] arraylist, array 간 형변환  (0) 2018.11.22
[Spring] Exception Handler, Parameter  (0) 2018.11.22
[Guava] Splitter  (0) 2018.11.17
[Mybatis] selectKey  (0) 2018.11.17

+ Recent posts