spring集成mybatis以及SQL语句的输出
来源:互联网 发布:返利网在淘宝上买手机 编辑:程序博客网 时间:2024/05/18 01:53
spring集成mybatis即:spring-mybatis.xml:
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"><property name="dataSource" ref="myDataSource" /><!-- 添加mybatis配置文件 --><property name="configLocation" value="/WEB-INF/config/mybatis/mybatis-config.xml"/><property name="mapperLocations" value="/WEB-INF/config/mybatis/mapper/*.xml"/></bean>如果数据源和对象映射的mapping文件已经在spring-mybatis.xml中配置了,则没有必要在mybatis-config.xml中配置了,所有说在与spring集成完后,mybatis-config.xml可有可无,但是如果要配置mybatis插件和SQL语句输出等待,还是引入mybatis-config.xml更方便一些。在spring引入就是这句:
<property name="configLocation" value="/WEB-INF/config/mybatis/mybatis-config.xml"/>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> <plugins> <plugin interceptor="com.neusoft.util.PageHelper"> <property name="databaseType" value="Oracle"/> </plugin> </plugins></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语句
- 记录工作中的奇葩事儿
- 检查一个变量是否是数字或者数字字符串
- freemarker合并单元格
- Servlet(3)—Servlet
- spring boot 发送邮件
- spring集成mybatis以及SQL语句的输出
- 数据库与网络请求相结合
- 图片轮播
- ALSADMA缓冲区分析
- IP首部校验和计算原理
- 为什么HTTP有时候比HTTPS要好?
- Wireshark常用过滤器
- 将博客搬至CSDN
- 发布-订阅模式