码迷,mamicode.com
首页 >  
搜索关键字:mybaits    ( 326个结果
Mybatis3源码分析(三):解析mapper的xml配置文件
这一章我们来看看mybaits是怎么读取mapper的xml配置文件并解析其中的sql语句。     我们还记得是这样配置sqlSessionFactory的:     这里配置了一个mapperLocations属性,它是一个表达式,sqlSessionFactory会根据这个表达式读取包com.xxx.mybai...
分类:移动开发   时间:2015-02-25 00:44:58    阅读次数:290
hibernate与mybatis异同与比较(涵盖网上各个版本,清晰明了)
一、序言        最近一直用mybatis做开发,以前用过hibernate,能感受到一些它们在使用上的区别,不过总想抽出时间来好好比较比较弄弄清楚它们各自的优劣,以便更好进行选择和深入的了解。        网上也看了很多资料,结合自己的使用体会,粗率地概括和总结了一下,以供大家参考。 二、具体运用上的不同 1、所需的jar包 Mybatis:只需要3个(mybatis-3.1....
分类:Web程序   时间:2015-02-15 09:31:17    阅读次数:329
Mybaits3源码分析(二):扫描Mapper关联到spring IOC容器
首先讲讲mapper是怎么从配置到对象的。         实现了basePackage下所有实现了markerInterface指明的类的接口都会被扫描解析到。MapperScannerConfigurer实现了BeanDefinitionRegistryPostProcessor(BeanDefinitionRegistry后置...
分类:移动开发   时间:2015-02-04 02:01:40    阅读次数:308
spring整合mybaits时Connections could not be acquired from the underlying database!异常解决
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="ht...
分类:数据库   时间:2014-12-14 13:22:11    阅读次数:280
mybaits中使用存储过程
如何使用Mybaits调用数据库中的存储过程,下面以Oracle数据库的为例:   1.在数据库中创建以下的存储过程: create or replace procedure pro_hello(p_result out varchar2) is begin   select * from 表名 where 条件=p_result end;   2....
分类:其他好文   时间:2014-10-23 12:33:43    阅读次数:362
XML fragments parsed from previous mappers already contains value for
XML fragments parsed from previous mappers already contains value for  像这种原因导致的错误,是xml文件映射的方法名重复的问题, 我在网上查的资料,也有人说是参数类型和返回值类型的错误, 我这里的问题是方法名重复问题,请仔细检查...
分类:移动开发   时间:2014-09-28 14:37:22    阅读次数:255
【狂人小白】MyBatis.002 第一个查询!
参考请注意后面文章中的注释MyBatis官方入门:http://mybatis.github.io/mybatis-3/zh/getting-started.html源代码下载:(正在审核中)代码结构1.config:配置文件目录 2.pojo:Bean类包 3.controller:数据接口 4.sql:数据库源文件数据库创建CREATEDATABASEIFNOTEXISTS`myba..
分类:其他好文   时间:2014-09-19 02:23:05    阅读次数:352
mybaits非配置原因,导致SqlSession was not registered for synchronization异常
今天运行程序时报了SqlSession[org.apache.ibatis.session.defaults.DefaultSqlSession@69d4fb43]wasnotregisteredforsynchronizationbecausesynchronizationisnotactive[11:03:17]-ClosingnontransactionalSqlSession[org.apache.ibatis.session.defaults.DefaultSqlSession@6..
分类:数据库   时间:2014-09-11 15:33:24    阅读次数:48394
mybaits的xxMapper.xml文件中大于号和小于号处理
第一种方法: 因为这个是xml格式的,所以不允许出现类似“>”这样的字符,但是都可以使用符号进行说明,将此类符号不进行解析 。 mapper文件示例代码: select * from ad_n_advertise_t where user_id in #{item} and isdelete=#{isdelete,jdbcType=TINYINT}...
分类:移动开发   时间:2014-09-01 22:47:14    阅读次数:1538
J2EE开发框架搭建(7) - 用hibernate实现类似mybaits把sql写在配置文字中
为了避免sql编写在Java代码,...
分类:数据库   时间:2014-08-29 16:05:25    阅读次数:358
326条   上一页 1 ... 30 31 32 33 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!