随笔分类 - mybatis
摘要:mybatis有两种分页方法(转自:http://blog.csdn.net/leozhou13/article/details/50394242) 1、内存分页,也就是假分页。本质是查出所有的数据然后根据游标的方式,截取需要的记录。如果数据量大,开销大和内存溢出。 使用方式: 利用自动生成的exa
阅读全文
摘要:(转自:http://blog.csdn.net/canot/article/details/51485955) Mybatis表现关联关系比hibernate简单,没有分那么细致one-to-many、many-to-one、one-to-one。而是只有两种association(一)、coll
阅读全文
摘要:mybatis官方网站:http://www.mybatis.org/mybatis-3/zh/configuration.html <!--第一步:加载配置数据库相关参数--> <context:property-placeholder location="classpath:jdbc.prope
阅读全文
摘要:checkoutTimeout设置成1000引发的调试错误: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### E
阅读全文
摘要:Java代码 <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.model.OperationBookList" > insert into operation_book_list (id,
阅读全文
摘要:1.在当前的maven项目的pom.xml中添加插件 2.然后在classpath下添加配置文件generatorConifig 3.使用mybatis-generator:generate命令来执行配置文件 在eclipse下先安装插件mybatis-generator1.3.5插件.然后配置生成
阅读全文
摘要:1.PreparedStatement是预编译的,对于批量处理可以大大提高效率. 也叫JDBC存储过程2.使用 Statement 对象。在对数据库只执行一次性存取的时侯,用 Statement 对象进行处理。PreparedStatement 对象的开销比Statement大,对于一次性操作并不会
阅读全文

浙公网安备 33010602011771号