mybatis-config配置文档
来源:互联网 发布:erp软件命令 编辑:程序博客网 时间:2024/06/06 00:13
xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd">
<!-- 定义Mybatis的SqlSessionFactory -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<!-- 指定数据源 -->
<property name="dataSource" ref="dataSource" />
<!-- 指定Mybatis的全局配置文件 -->
<property name="configLocation" value="classpath:mybatis/mybatis-config.xml"/>
<!-- 扫描mappers目录以及子目录下的所有xml文件 -->
<property name="mapperLocations" value="classpath:mybatis/mappers/**/*.xml" />
<!-- 别名包 -->
<property name="typeAliasesPackage" value="com.seatao.manage.pojo"/>
</bean>
<!--
无需指定sqlSessionFactory,扫描器会自动搜索查找sqlSessionFactory
-->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<!-- 指定Mapper接口所在的包 -->
<property name="basePackage" value="com.seatao.manage.mapper" />
</bean>
=================================================================
<?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="mapUnderscoreToCamelCase" value="true" />
</settings>
<plugins>
<plugin interceptor="com.github.pagehelper.PageHelper">
<property name="dialect" value="mysql" />
<!-- 设置为true时,使用RowBounds分页会进行count查询 -->
<property name="rowBoundsWithCount" value="true" />
</plugin>
<plugin interceptor="com.github.abel533.mapperhelper.MapperInterceptor">
<!--主键自增回写方法,默认值MYSQL,详细说明请看文档 -->
<property name="IDENTITY" value="MYSQL" />
<!--通用Mapper接口,多个通用接口用逗号隔开 -->
<property name="mappers" value="com.github.abel533.mapper.Mapper" />
</plugin>
</plugins>
</configuration>
</beans>
===============================================================================
- mybatis-config配置文档
- mybatis-config.xml配置
- mybatis-config配置 介绍
- mybatis-config配置setting说明
- IntelliJ配置mybatis-config.xml
- mybatis-config.xml文件配置
- mybatis-config.xml文件配置
- Mybatis-config.xml配置详解
- mybatis之mybatis-config.xml 配置详解
- mybatis之mybatis-config.xml 配置详解
- 读写配置文档app.config
- 继续总结mybatis-config的相关配置
- mybatis-config.xml的配置详解
- Eclipse中配置mybatis-3-config.dtd
- Mybatis-config.xml文件的配置
- Eclipse中配置mybatis-3-config.dtd
- mybatis-config.xml 的配置相关信息
- [翻译]树莓派配置文档config.txt说明
- HDU 5475 平衡树/线段树
- Android定位入门(2)判断GPS是否开启
- 使用静态内部类提高封装性
- Ubuntu系统监听器
- 网址收集
- mybatis-config配置文档
- AsyncTask的学习
- printf在终端输出时改变颜色
- Nginx指南和配置详解
- 谱聚类的实现
- leetcode之Search a 2D Matrix
- UIview基本
- 最简单的mfc程序
- 数据结构: 无向图和有向图的API