20170725
来源:互联网 发布:阿里巴巴代销传淘宝 编辑:程序博客网 时间:2024/06/12 18:12
链接语句:
int count =0 ;
InputStream is=null;
SqlSession sqlSession=null;
try {
is=Resources.getResourceAsStream("mybatis-config.xml");
SqlSessionFactory factory =new SqlSessionFactoryBuilder().build(is);
sqlSession = factory.openSession();
读取语句:
count= sqlSession.selectOne("com.yy.dao.UserDao.count");
xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mypper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yy.dao.UserDao">
<select id="count" resultType="int">
select count(*) from jdbc
</select>
<mapper>
导入po包:
配置:
<mappers>
<mapper resource="com/yy/dao/UserMapper.xml"/>
</mappers>
加入jar包:
阅读全文
1 0
- 20170725
- 20170725
- 20170725
- 20170725
- 20170725 JQuery学习入门
- 20170725 jQuery语法简介
- 20170725考试总结
- 自练题20170725
- 20170725——学习总结
- 20170725 用Jquery修改CSS
- 20170725——按键输入实验
- 项目开发记录——全民矿工20170725
- 20170725使用linux的GDB打印STL(vector,map,set..................)
- ACMer永远不退役—20170725网络赛题解
- 20170725Linux下Makefile之三_动态链接库与静态链接库
- CSDN日报20170725——《新的开始,从研究生到入职亚马逊》
- xynuoj 求两个数中的较大者
- Mybatis快速入门
- u3d
- 【Web开发技术】Web开发、Tomcat组成结构、技术介绍
- 在Ubuntu上编译生成Windows程序
- 20170725
- 专访平安科技首席科学家肖京:平安智能化的甜蜜与辛酸
- 手机访问PC站自动跳转手机站
- 范围for语句
- Palindrome Names Kattis
- Python中numpy和pandas中axis浅谈
- (DP,二维背包)Watch The Movie--HDOJ
- sony vegas pro 13 v13.0.453中文版
- Centos7安装Docker最新版