1. # 사용
쿼리 ex)
<select id = "readPokemon" parameterClass="java.lang.Integer" resultMap="pokomon-result">
select * from pokemonInfo where no = #no#
</select>
로그
- select * from pokemonInfo where no = ?
- parameter : [1]
parameter 값 1에 해당되는 정보가 표시된다.
#은 대입되어서 값이 들어간다.
2. $ 사용
쿼리 ex)
<select id = "readPokemon" parameterClass="java.lang.Integer" resultMap="pokomon-result">
select * from pokemonInfo where no = $no$
</select>
로그
- select * from pokemonInfo where no = 1
- parameter : []
보면 $의 경우 입력한 값이 그대로 쿼리안으로 들어간다.
참고 : http://tip.daum.net/question/58690260
반응형
'프로그래밍 > Java & GWT' 카테고리의 다른 글
ibatis - hibernate 프레임워크 비교 (0) | 2016.08.22 |
---|---|
[java] awt - button 만들기. (0) | 2016.08.21 |
[GWT] 1. sample 프로젝트 만들기. (0) | 2016.07.20 |
[GWT] 0.진행 순서 (0) | 2016.07.20 |
[gwt] splitLayout dragger color 수정 (0) | 2015.08.31 |
댓글