其他分享
首页 > 其他分享> > mybatis核心配置文件

mybatis核心配置文件

作者:互联网

mybatis核心配置文件:

SqlMapConfig.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">
<!--mybatis的住配置文件-->
<configuration>
    <properties resource="jdbcConfig.properties"></properties>

    <!--开启驼峰命名-->
    <settings>
        <setting name="mapUnderscoreToCamelCase" value="true"></setting>
    </settings>

    <!--导入分页插件-->
    <plugins>
        <plugin interceptor="com.github.pagehelper.PageInterceptor"></plugin>
    </plugins>

    <environments default="mysql">
        <environment id="mysql">
            <transactionManager type="JDBC"></transactionManager>
            <dataSource type="POOLED">
                <property name="driver" value="${jdbc.driver}"></property>
                <property name="url" value="${jdbc.url}"></property>
                <property name="username" value="${jdbc.username}"></property>
                <property name="password" value="${jdbc.password}"></property>
            </dataSource>
        </environment>
    </environments>

    <mappers>
        <package name="com.xzq.mapper"></package>
    </mappers>

</configuration>

标签:mybatis,核心,SqlMapConfig,配置文件,xml
来源: https://blog.csdn.net/qq_45399396/article/details/120518322