spring集成mybatis后,打印SQL语句
来源:互联网 发布:哈萨克所有软件 编辑:程序博客网 时间:2024/05/16 12:36
网上说mybatis的早前版本配置打印sql还比较简单,在3.0.6之后配置方式修改了。
现在的spring-mybatis.xml配置如下:
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="configLocation" value="classpath:conf/mybatis-config.xml"></property> <!-- 自动扫描mapping.xml文件 --> <property name="mapperLocations" value="classpath:com/cyber/vip/dao/*.xml"></property> </bean>
mybatis-config.xml:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"><configuration> <settings> <!-- 打印查询语句 --> <setting name="logImpl" value="STDOUT_LOGGING" /> </settings> <!-- mapper已经在spring-mybatis.xml中的sqlSessionFactory配置,这里不再需要配置 --><!-- <mappers> --><!-- <mapper resource="com/a/b/c/dao/BusinessInfoDaoMapper.xml" /> --><!-- </mappers> --></configuration>
0 0
- spring集成mybatis后,打印SQL语句
- spring集成mybatis后,打印SQL语句
- spring集成mybatis后,打印SQL语句
- spring集成mybatis后,打印SQL语句
- spring集成mybatis后,打印SQL语句
- Spring集成mybatis后,打印SQL语句
- spring集成mybatis后,打印SQL语句
- spring集成mybatis后,打印SQL语句
- spring集成mybatis后,打印SQL语句
- spring集成mybatis后,打印SQL语句
- spring集成mybatis后,打印SQL语句
- spring集成mybatis后,打印SQL语句
- spring集成mybatis后,打印SQL语句
- spring集成mybatis后,打印SQL语句
- spring集成mybatis后,打印SQL语句
- spring集成mybatis后打印SQL语句
- spring集成mybatis后,需要打印SQL语句
- spring集成mybatis时打印出sql语句的配置
- 【PAT】1001. A+B Format
- Spring Boot初级教程
- Caffe学习日记4
- Mesh的平面切割算法
- ueditor宽度随网页变化
- spring集成mybatis后,打印SQL语句
- 长按OnLongClickListener无法修改长按时间的解决办法
- 基于Xen4.7在Ubuntu16.04 LTS搭建Drakvuf使用环境
- C语言中的switch case比较
- react native CameraRoll
- 深入解读Spring Framework IoC容器(第四弹:p命名空间和c命名空间)
- MuMuDVB
- Android源码解析四大组件系列(一)---Service的启动过程分析
- zookeeper基本原理及适用场景 转:http://blog.chinaunix.net/uid-26748613-id-4536290.html