일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Source
- context
- Quartz
- vscode
- import
- resource
- web.xml
- port
- lsof
- Windows
- profile
- 네트워크
- grep
- bash
- JavaScript
- Eclipse
- maVen
- plugin
- IntelliJ
- 단축키
- Mac
- xargs
- VirtualBox
- Windows 10
- netsh
- find
- tomcat
- 줄바꿈 문자
- ssh
- GIT
- Today
- Total
develog
MyBatis 프로시저 호출, result parameterMap 본문
Java
----------------------------------------------------------------
public void testProc(SqlSession session) throws SQLException {
HashMap<String, String> param = new HashMap<String, String>();
param.put("param1", "aa");
param.put("param2", "cc");
param.put("resultCd", "");
param.put("resultMsg", "");
session.selectOne("UserStatOld.testProc", param);
System.out.println("resultCd : " + param.get("resultCd"));
System.out.println("resultMsg : " + param.get("resultMsg"));
}
XML
----------------------------------------------------------------
<parameterMap id="procMap" type="HashMap">
<parameter property="param1" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String" />
<parameter property="param2" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String" />
<parameter property="resultCd" mode="OUT" jdbcType="VARCHAR" javaType="String" />
<parameter property="resultMsg" mode="OUT" jdbcType="VARCHAR" javaType="String" />
</parameterMap>
<select id="testProc" statementType="CALLABLE" parameterMap="procMap">
{call PR_TEST(?, ?, ?, ?)}
</select>
'Dev > Java' 카테고리의 다른 글
JDBC Driver 버전 확인 (0) | 2012.04.26 |
---|---|
try catch finally - Flow (0) | 2012.04.26 |
MyBatis 프로시저 호출, result Vo (0) | 2012.04.24 |
mybatis (0) | 2012.04.18 |
log4j level 설정 (0) | 2012.04.18 |