반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- popup
- NextJS
- Eclipse
- node.js
- yona
- SpringBoot
- Maven
- pwa
- mysql
- jenkins
- javascript
- Next.js
- rocky9
- FCM
- centos7
- mybatis
- git
- config
- ajax
- PM2
- Java
- MSsql
- Push
- spring3
- docker
- jquery
- Tomcat
- MariaDB
- security
- nodejs
Archives
- Today
- Total
목록selectOne (1)
종이 한장 차이...
mybatis+select count() resultType
Spring MVC에서 select count() 시 mybatis설정 및 resultType 참고. - Dao 쿼리 결과를 Object로 받은 후 int로 리턴. public int getUserCount(userInfoVO params) { Object obj = selectOne("selectUserCount"); return obj == null ? 0 : (Integer) obj; } - mybatis에서 resultType을 Integer로 설정. SELECT COUNT(*) FROM USERINFO with(nolock) WHERE user_code = #{userCode};
Spring
2023. 11. 27. 10:43