일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- netsh
- ssh
- Windows 10
- 네트워크
- context
- Source
- Eclipse
- Mac
- plugin
- 단축키
- 줄바꿈 문자
- vscode
- GIT
- tomcat
- bash
- import
- Quartz
- Windows
- resource
- port
- find
- web.xml
- grep
- maVen
- VirtualBox
- IntelliJ
- JavaScript
- xargs
- lsof
- profile
- Today
- Total
develog
MyBatis 프로시저 호출, result Vo 본문
Java
----------------------------------------------------------------
public void testProc(SqlSession session) throws SQLException {
ProcVo vo = new ProcVo();
vo.setParam1("11");
vo.setParam2("bb");
session.update("UserStatOld.testProc", vo);
System.out.println("resultCd : " + vo.getResultCd());
System.out.println("resultMsg : " + vo.getResultMsg());
}
Vo
----------------------------------------------------------------
public class ProcVo {
private String param1;
private String param2;
private String resultCd;
private String resultMsg;
// 이하 getter, setter 정의
}
XML
----------------------------------------------------------------
<update id="testProc" statementType="CALLABLE" parameterType="vo.ProcVo">
{call PR_TEST(
#{param1, mode=IN, jdbcType=VARCHAR}
, #{param2, mode=IN, jdbcType=VARCHAR}
, #{resultCd, mode=OUT, jdbcType=VARCHAR}
, #{resultMsg, mode=OUT, jdbcType=VARCHAR}
)}
</update>
'Dev > Java' 카테고리의 다른 글
try catch finally - Flow (0) | 2012.04.26 |
---|---|
MyBatis 프로시저 호출, result parameterMap (0) | 2012.04.24 |
mybatis (0) | 2012.04.18 |
log4j level 설정 (0) | 2012.04.18 |
myBatis (0) | 2012.04.18 |