14.mybatis_spring_mapper(传智播客)

需求:根据用户id查询用户信息

整合思路:需要spring通过单例方式管理SqlSessionFactory。
spring和mybatis整合生成代理对象,使用SqlSessionFactory创建SqlSession(spring和mybatis整合自动完成)。

一.配置

1.工程结构如图所示,请自行增减相关目录和文件
在这里插入图片描述

2.mybatis.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>
	    <!-- 配置别名 -->
	    <typeAliases>
	        <!-- 批量扫描别名 -->
	        <package name="com.steven.ssm.po"/>
	    </typeAliases>
	</configuration>

3.applicationContext-dao.xml

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:context="http://www.springframework.org/schema/context"
       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">

    <!-- 加载db.properties -->
    <context:property-placeholder location="config/mybatis/db.properties" />
    <!-- 1.配置数据源(c3p0数据库连接池) -->
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
        <!-- 基础配置 -->
        <property name="jdbcUrl" value="${jdbc.url}"/>
        <property name="driverClass" value="${jdbc.driver}"/>
        <property name="user" value="${jdbc.username}"/>
        <property name="password" value="${jdbc.password}"/>
    </bean>
    
    <!-- 2.配置sqlSessionFactory对象 -->
    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <!-- 加载数据源 -->
        <property name="dataSource" ref="dataSource" />
        <!-- 加载mybatis的全局配置文件 -->
        <property name="configLocation" value="config/mybatis/mybatis.xml" />
        <!--设置映射文件位置-->
        <property name="mapperLocations" value="sqlmap/*.xml"/>
    </bean>
    
    <!-- 3.配置mapper扫描器 -->
    <bean id="mapperScannerConfigurer" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <!-- 扫描包路径(如果需要扫描多个包,中间使用半角逗号隔开) -->
        <property name="basePackage" value="com.steven.ssm.mapper"/>
        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
    </bean>
</beans>

二.映射

1.mapper接口

public interface UserMapper {
    User findUserById(int id) throws Exception;
}

2.sql映射文件

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.steven.ssm.mapper.UserMapper">
	<select id="findUserById" resultType="User" parameterType="int">
		select * from user where id=#{id}
	</select>
</mapper>

三.po类编写

public class User {
    //属性名要和数据库表的字段对应
    private int id;
    private String username;// 用户姓名
    private String sex;// 性别
    private String birthday;// 生日
    private String address;// 地址
    //get和set方法......
}

四.测试

public class Test {
    public static void main(String[] args) throws Exception {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("config/spring/applicationContext-dao.xml");
        UserMapper userMapper = (UserMapper)applicationContext.getBean("userMapper");
        User user = userMapper.findUserById(1);
        System.out.println(user);
    }
}

运行测试结果如下

"C:\Program Files\Java\jdk1.8.0_51\bin\java.exe" "-javaagent:D:\IDEA\IntelliJ IDEA 2018.2\lib\idea_rt.jar=56320:D:\IDEA\IntelliJ IDEA 2018.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_51\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\rt.jar;E:\代码存档\mybatis\12.mybatis_spring_mapper\target\test-classes;E:\代码存档\mybatis\12.mybatis_spring_mapper\target\classes;E:\代码存档\repository\org\springframework\spring-webmvc\4.2.4.RELEASE\spring-webmvc-4.2.4.RELEASE.jar;E:\代码存档\repository\org\springframework\spring-beans\4.2.4.RELEASE\spring-beans-4.2.4.RELEASE.jar;E:\代码存档\repository\org\springframework\spring-context\4.2.4.RELEASE\spring-context-4.2.4.RELEASE.jar;E:\代码存档\repository\org\springframework\spring-aop\4.2.4.RELEASE\spring-aop-4.2.4.RELEASE.jar;E:\代码存档\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;E:\代码存档\repository\org\springframework\spring-expression\4.2.4.RELEASE\spring-expression-4.2.4.RELEASE.jar;E:\代码存档\repository\org\springframework\spring-web\4.2.4.RELEASE\spring-web-4.2.4.RELEASE.jar;E:\代码存档\repository\org\springframework\spring-core\4.2.4.RELEASE\spring-core-4.2.4.RELEASE.jar;E:\代码存档\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;E:\代码存档\repository\org\springframework\spring-orm\4.2.4.RELEASE\spring-orm-4.2.4.RELEASE.jar;E:\代码存档\repository\org\springframework\spring-tx\4.2.4.RELEASE\spring-tx-4.2.4.RELEASE.jar;E:\代码存档\repository\org\springframework\spring-aspects\4.2.4.RELEASE\spring-aspects-4.2.4.RELEASE.jar;E:\代码存档\repository\org\aspectj\aspectjweaver\1.8.7\aspectjweaver-1.8.7.jar;E:\代码存档\repository\org\springframework\spring-test\4.2.4.RELEASE\spring-test-4.2.4.RELEASE.jar;E:\代码存档\repository\org\springframework\spring-jdbc\4.2.4.RELEASE\spring-jdbc-4.2.4.RELEASE.jar;E:\代码存档\repository\mysql\mysql-connector-java\5.1.38\mysql-connector-java-5.1.38.jar;E:\代码存档\repository\org\mybatis\mybatis\3.3.1\mybatis-3.3.1.jar;E:\代码存档\repository\org\mybatis\mybatis-spring\1.2.4\mybatis-spring-1.2.4.jar;E:\代码存档\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;E:\代码存档\repository\org\slf4j\slf4j-api\1.7.18\slf4j-api-1.7.18.jar;E:\代码存档\repository\org\slf4j\slf4j-log4j12\1.7.25\slf4j-log4j12-1.7.25.jar;E:\代码存档\repository\com\mchange\c3p0\0.9.2.1\c3p0-0.9.2.1.jar;E:\代码存档\repository\com\mchange\mchange-commons-java\0.2.3.4\mchange-commons-java-0.2.3.4.jar;E:\代码存档\repository\javax\servlet\jstl\1.2\jstl-1.2.jar;E:\代码存档\repository\taglibs\standard\1.1.2\standard-1.1.2.jar" Test
DEBUG [main] - Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [main] - Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [main] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
 INFO [main] - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@45fe3ee3: startup date [Sat Dec 08 11:53:16 CST 2018]; root of context hierarchy
DEBUG [main] - Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [main] - Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [main] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
 INFO [main] - Loading XML bean definitions from class path resource [config/spring/applicationContext-dao.xml]
DEBUG [main] - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
DEBUG [main] - Loading schema mappings from [META-INF/spring.schemas]
DEBUG [main] - Loaded schema mappings: {http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/cache/spring-cache-4.2.xsd=org/springframework/cache/config/spring-cache-4.2.xsd, http://www.springframework.org/schema/aop/spring-aop-4.1.xsd=org/springframework/aop/config/spring-aop-4.1.xsd, http://www.springframework.org/schema/context/spring-context-3.1.xsd=org/springframework/context/config/spring-context-3.1.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-4.1.xsd=org/springframework/jdbc/config/spring-jdbc-4.1.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd=org/springframework/web/servlet/config/spring-mvc-4.1.xsd, http://mybatis.org/schema/mybatis-spring-1.2.xsd=org/mybatis/spring/config/mybatis-spring-1.2.xsd, http://www.springframework.org/schema/aop/spring-aop-3.2.xsd=org/springframework/aop/config/spring-aop-3.2.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-4.2.xsd, http://www.springframework.org/schema/lang/spring-lang-4.1.xsd=org/springframework/scripting/config/spring-lang-4.1.xsd, http://www.springframework.org/schema/context/spring-context-4.0.xsd=org/springframework/context/config/spring-context-4.0.xsd, http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd=org/springframework/web/servlet/config/spring-mvc-3.2.xsd, http://www.springframework.org/schema/beans/spring-beans-4.2.xsd=org/springframework/beans/factory/xml/spring-beans-4.2.xsd, http://www.springframework.org/schema/tool/spring-tool-4.1.xsd=org/springframework/beans/factory/xml/spring-tool-4.1.xsd, http://www.springframework.org/schema/lang/spring-lang-3.2.xsd=org/springframework/scripting/config/spring-lang-3.2.xsd, http://www.springframework.org/schema/cache/spring-cache-3.2.xsd=org/springframework/cache/config/spring-cache-3.2.xsd, http://www.springframework.org/schema/jee/spring-jee-4.1.xsd=org/springframework/ejb/config/spring-jee-4.1.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd=org/springframework/jdbc/config/spring-jdbc-3.1.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/task/spring-task-4.2.xsd=org/springframework/scheduling/config/spring-task-4.2.xsd, http://www.springframework.org/schema/tool/spring-tool-3.2.xsd=org/springframework/beans/factory/xml/spring-tool-3.2.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-4.2.xsd, http://www.springframework.org/schema/tx/spring-tx-4.2.xsd=org/springframework/transaction/config/spring-tx-4.2.xsd, http://www.springframework.org/schema/cache/spring-cache-4.1.xsd=org/springframework/cache/config/spring-cache-4.1.xsd, http://www.springframework.org/schema/aop/spring-aop-4.0.xsd=org/springframework/aop/config/spring-aop-4.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.2.xsd=org/springframework/ejb/config/spring-jee-3.2.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-4.0.xsd=org/springframework/jdbc/config/spring-jdbc-4.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd=org/springframework/web/servlet/config/spring-mvc-4.0.xsd, http://www.springframework.org/schema/beans/spring-beans-3.2.xsd=org/springframework/beans/factory/xml/spring-beans-3.2.xsd, http://www.springframework.org/schema/aop/spring-aop-3.1.xsd=org/springframework/aop/config/spring-aop-3.1.xsd, http://www.springframework.org/schema/lang/spring-lang-4.0.xsd=org/springframework/scripting/config/spring-lang-4.0.xsd, http://www.springframework.org/schema/mvc/spring-mvc.xsd=org/springframework/web/servlet/config/spring-mvc-4.2.xsd, http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd=org/springframework/web/servlet/config/spring-mvc-3.1.xsd, http://www.springframework.org/schema/beans/spring-beans-4.1.xsd=org/springframework/beans/factory/xml/spring-beans-4.1.xsd, http://www.springframework.org/schema/tool/spring-tool-4.0.xsd=org/springframework/beans/factory/xml/spring-tool-4.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.2.xsd=org/springframework/transaction/config/spring-tx-3.2.xsd, http://www.springframework.org/schema/lang/spring-lang-3.1.xsd=org/springframework/scripting/config/spring-lang-3.1.xsd, http://www.springframework.org/schema/cache/spring-cache-3.1.xsd=org/springframework/cache/config/spring-cache-3.1.xsd, http://www.springframework.org/schema/jee/spring-jee-4.0.xsd=org/springframework/ejb/config/spring-jee-4.0.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd=org/springframework/jdbc/config/spring-jdbc-3.0.xsd, http://www.springframework.org/schema/task/spring-task-4.1.xsd=org/springframework/scheduling/config/spring-task-4.1.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc.xsd=org/springframework/jdbc/config/spring-jdbc-4.2.xsd, http://www.springframework.org/schema/tool/spring-tool-3.1.xsd=org/springframework/beans/factory/xml/spring-tool-3.1.xsd, http://www.springframework.org/schema/tx/spring-tx-4.1.xsd=org/springframework/transaction/config/spring-tx-4.1.xsd, http://www.springframework.org/schema/cache/spring-cache-4.0.xsd=org/springframework/cache/config/spring-cache-4.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.1.xsd=org/springframework/ejb/config/spring-jee-3.1.xsd, http://www.springframework.org/schema/task/spring-task-3.2.xsd=org/springframework/scheduling/config/spring-task-3.2.xsd, http://www.springframework.org/schema/util/spring-util-4.2.xsd=org/springframework/beans/factory/xml/spring-util-4.2.xsd, http://www.springframework.org/schema/beans/spring-beans-3.1.xsd=org/springframework/beans/factory/xml/spring-beans-3.1.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-4.2.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd=org/springframework/web/servlet/config/spring-mvc-3.0.xsd, http://www.springframework.org/schema/beans/spring-beans-4.0.xsd=org/springframework/beans/factory/xml/spring-beans-4.0.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-4.2.xsd, http://mybatis.org/schema/mybatis-spring.xsd=org/mybatis/spring/config/mybatis-spring-1.2.xsd, http://www.springframework.org/schema/tx/spring-tx-3.1.xsd=org/springframework/transaction/config/spring-tx-3.1.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/task/spring-task-4.0.xsd=org/springframework/scheduling/config/spring-task-4.0.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-4.0.xsd=org/springframework/transaction/config/spring-tx-4.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/util/spring-util-4.1.xsd=org/springframework/beans/factory/xml/spring-util-4.1.xsd, http://www.springframework.org/schema/task/spring-task-3.1.xsd=org/springframework/scheduling/config/spring-task-3.1.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-4.2.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/util/spring-util-3.2.xsd=org/springframework/beans/factory/xml/spring-util-3.2.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-4.2.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/context/spring-context-4.2.xsd=org/springframework/context/config/spring-context-4.2.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/util/spring-util-4.0.xsd=org/springframework/beans/factory/xml/spring-util-4.0.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-4.2.xsd=org/springframework/aop/config/spring-aop-4.2.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-4.2.xsd, http://www.springframework.org/schema/context/spring-context-3.2.xsd=org/springframework/context/config/spring-context-3.2.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-4.2.xsd=org/springframework/jdbc/config/spring-jdbc-4.2.xsd, http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd=org/springframework/web/servlet/config/spring-mvc-4.2.xsd, http://www.springframework.org/schema/util/spring-util-3.1.xsd=org/springframework/beans/factory/xml/spring-util-3.1.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/cache/spring-cache.xsd=org/springframework/cache/config/spring-cache-4.2.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-4.2.xsd, http://www.springframework.org/schema/lang/spring-lang-4.2.xsd=org/springframework/scripting/config/spring-lang-4.2.xsd, http://www.springframework.org/schema/context/spring-context-4.1.xsd=org/springframework/context/config/spring-context-4.1.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-4.2.xsd=org/springframework/beans/factory/xml/spring-tool-4.2.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-4.2.xsd=org/springframework/ejb/config/spring-jee-4.2.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd=org/springframework/jdbc/config/spring-jdbc-3.2.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-4.2.xsd}
DEBUG [main] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-4.0.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-4.0.xsd
DEBUG [main] - Found XML schema [http://www.springframework.org/schema/context/spring-context-4.0.xsd] in classpath: org/springframework/context/config/spring-context-4.0.xsd
DEBUG [main] - Found XML schema [http://www.springframework.org/schema/tool/spring-tool-4.0.xsd] in classpath: org/springframework/beans/factory/xml/spring-tool-4.0.xsd
DEBUG [main] - Loading bean definitions
DEBUG [main] - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler, http://www.springframework.org/schema/mvc=org.springframework.web.servlet.config.MvcNamespaceHandler, http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler, http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler, http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler, http://www.springframework.org/schema/jdbc=org.springframework.jdbc.config.JdbcNamespaceHandler, http://www.springframework.org/schema/cache=org.springframework.cache.config.CacheNamespaceHandler, http://mybatis.org/schema/mybatis-spring=org.mybatis.spring.config.NamespaceHandler, http://www.springframework.org/schema/c=org.springframework.beans.factory.xml.SimpleConstructorNamespaceHandler, http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler, http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler, http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler, http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler}
DEBUG [main] - Neither XML 'id' nor 'name' specified - using generated bean name [org.mybatis.spring.mapper.MapperScannerConfigurer#0]
DEBUG [main] - Loaded 4 bean definitions from location pattern [config/spring/applicationContext-dao.xml]
DEBUG [main] - Bean factory for org.springframework.context.support.ClassPathXmlApplicationContext@45fe3ee3: org.springframework.beans.factory.support.DefaultListableBeanFactory@754ba872: defining beans [org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,sqlSessionFactory,org.mybatis.spring.mapper.MapperScannerConfigurer#0]; root of factory hierarchy
DEBUG [main] - Creating shared instance of singleton bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'
DEBUG [main] - Creating instance of bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'
DEBUG [main] - Eagerly caching bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' to allow for resolving potential circular references
DEBUG [main] - Invoking afterPropertiesSet() on bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'
DEBUG [main] - Finished creating instance of bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'
DEBUG [main] - Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [main] - Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [main] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
DEBUG [main] - Looking for matching resources in directory tree [E:\代码存档\mybatis\12.mybatis_spring_mapper\target\classes\com\steven\ssm\mapper]
DEBUG [main] - Searching directory [E:\代码存档\mybatis\12.mybatis_spring_mapper\target\classes\com\steven\ssm\mapper] for files matching pattern [E:/代码存档/mybatis/12.mybatis_spring_mapper/target/classes/com/steven/ssm/mapper/**/*.class]
DEBUG [main] - Resolved location pattern [classpath*:com/steven/ssm/mapper/**/*.class] to resources [file [E:\代码存档\mybatis\12.mybatis_spring_mapper\target\classes\com\steven\ssm\mapper\UserMapper.class]]
DEBUG [main] - Identified candidate component class: file [E:\代码存档\mybatis\12.mybatis_spring_mapper\target\classes\com\steven\ssm\mapper\UserMapper.class]
DEBUG [main] - Creating MapperFactoryBean with name 'userMapper' and 'com.steven.ssm.mapper.UserMapper' mapperInterface
DEBUG [main] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
DEBUG [main] - Creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
DEBUG [main] - Eagerly caching bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' to allow for resolving potential circular references
DEBUG [main] - Finished creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
DEBUG [main] - Creating shared instance of singleton bean 'org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0'
DEBUG [main] - Creating instance of bean 'org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0'
DEBUG [main] - Eagerly caching bean 'org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0' to allow for resolving potential circular references
DEBUG [main] - Finished creating instance of bean 'org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0'
DEBUG [main] - Adding [environmentProperties] PropertySource with lowest search precedence
 INFO [main] - Loading properties file from class path resource [config/mybatis/db.properties]
DEBUG [main] - Adding [localProperties] PropertySource with lowest search precedence
DEBUG [main] - Searching for key 'jdbc.url' in [environmentProperties]
DEBUG [main] - Searching for key 'jdbc.url' in [systemProperties]
DEBUG [main] - Searching for key 'jdbc.url' in [systemEnvironment]
DEBUG [main] - Could not find key 'jdbc.url' in any property source. Returning [null]
DEBUG [main] - Searching for key 'jdbc.url' in [localProperties]
DEBUG [main] - Found key 'jdbc.url' in [localProperties] with type [String] and value 'jdbc:mysql://localhost:3306/study?useSSL=false'
DEBUG [main] - Searching for key 'jdbc.driver' in [environmentProperties]
DEBUG [main] - Searching for key 'jdbc.driver' in [systemProperties]
DEBUG [main] - Searching for key 'jdbc.driver' in [systemEnvironment]
DEBUG [main] - Could not find key 'jdbc.driver' in any property source. Returning [null]
DEBUG [main] - Searching for key 'jdbc.driver' in [localProperties]
DEBUG [main] - Found key 'jdbc.driver' in [localProperties] with type [String] and value 'com.mysql.jdbc.Driver'
DEBUG [main] - Searching for key 'jdbc.username' in [environmentProperties]
DEBUG [main] - Searching for key 'jdbc.username' in [systemProperties]
DEBUG [main] - Searching for key 'jdbc.username' in [systemEnvironment]
DEBUG [main] - Could not find key 'jdbc.username' in any property source. Returning [null]
DEBUG [main] - Searching for key 'jdbc.username' in [localProperties]
DEBUG [main] - Found key 'jdbc.username' in [localProperties] with type [String] and value 'root'
DEBUG [main] - Searching for key 'jdbc.password' in [environmentProperties]
DEBUG [main] - Searching for key 'jdbc.password' in [systemProperties]
DEBUG [main] - Searching for key 'jdbc.password' in [systemEnvironment]
DEBUG [main] - Could not find key 'jdbc.password' in any property source. Returning [null]
DEBUG [main] - Searching for key 'jdbc.password' in [localProperties]
DEBUG [main] - Found key 'jdbc.password' in [localProperties] with type [String] and value 'admin123'
DEBUG [main] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'
DEBUG [main] - Creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'
DEBUG [main] - Eagerly caching bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' to allow for resolving potential circular references
DEBUG [main] - Finished creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'
DEBUG [main] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'
DEBUG [main] - Creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'
DEBUG [main] - Eagerly caching bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' to allow for resolving potential circular references
DEBUG [main] - Finished creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'
DEBUG [main] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'
DEBUG [main] - Creating instance of bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'
DEBUG [main] - Eagerly caching bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor' to allow for resolving potential circular references
DEBUG [main] - Finished creating instance of bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'
DEBUG [main] - Creating shared instance of singleton bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor'
DEBUG [main] - Creating instance of bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor'
DEBUG [main] - Eagerly caching bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor' to allow for resolving potential circular references
DEBUG [main] - Finished creating instance of bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor'
DEBUG [main] - Creating shared instance of singleton bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor'
DEBUG [main] - Creating instance of bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor'
DEBUG [main] - Eagerly caching bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor' to allow for resolving potential circular references
DEBUG [main] - Finished creating instance of bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor'
DEBUG [main] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@7fad8c79]
DEBUG [main] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@31206beb]
DEBUG [main] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@754ba872: defining beans [org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,sqlSessionFactory,org.mybatis.spring.mapper.MapperScannerConfigurer#0,userMapper,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor]; root of factory hierarchy
DEBUG [main] - Returning cached instance of singleton bean 'org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0'
DEBUG [main] - Creating shared instance of singleton bean 'dataSource'
DEBUG [main] - Creating instance of bean 'dataSource'
 INFO [main] - MLog clients using log4j logging.
 INFO [main] - Initializing c3p0-0.9.2.1 [built 20-March-2013 10:47:27 +0000; debug? true; trace: 10]
DEBUG [main] - MBean: com.mchange.v2.c3p0:type=PooledDataSource,identityToken=2tssb09z12twglj1608ea5|5d47c63f,name=2tssb09z12twglj1608ea5|5d47c63f registered.
DEBUG [main] - MBean: com.mchange.v2.c3p0:type=PooledDataSource,identityToken=2tssb09z12twglj1608ea5|5d47c63f,name=2tssb09z12twglj1608ea5|5d47c63f unregistered, in order to be reregistered after update.
DEBUG [main] - MBean: com.mchange.v2.c3p0:type=PooledDataSource,identityToken=2tssb09z12twglj1608ea5|5d47c63f,name=2tssb09z12twglj1608ea5|5d47c63f registered.
DEBUG [main] - Eagerly caching bean 'dataSource' to allow for resolving potential circular references
DEBUG [main] - Finished creating instance of bean 'dataSource'
DEBUG [main] - Creating shared instance of singleton bean 'sqlSessionFactory'
DEBUG [main] - Creating instance of bean 'sqlSessionFactory'
DEBUG [main] - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.
DEBUG [main] - Eagerly caching bean 'sqlSessionFactory' to allow for resolving potential circular references
DEBUG [main] - Returning cached instance of singleton bean 'dataSource'
DEBUG [main] - Looking for matching resources in directory tree [E:\代码存档\mybatis\12.mybatis_spring_mapper\target\classes\sqlmap]
DEBUG [main] - Searching directory [E:\代码存档\mybatis\12.mybatis_spring_mapper\target\classes\sqlmap] for files matching pattern [E:/代码存档/mybatis/12.mybatis_spring_mapper/target/classes/sqlmap/*.xml]
DEBUG [main] - Resolved location pattern [sqlmap/*.xml] to resources [file [E:\代码存档\mybatis\12.mybatis_spring_mapper\target\classes\sqlmap\UserMapper.xml]]
DEBUG [main] - Invoking afterPropertiesSet() on bean with name 'sqlSessionFactory'
DEBUG [main] - Class not found: org.jboss.vfs.VFS
DEBUG [main] - JBoss 6 VFS API is not available in this environment.
DEBUG [main] - Class not found: org.jboss.vfs.VirtualFile
DEBUG [main] - VFS implementation org.apache.ibatis.io.JBoss6VFS is not valid in this environment.
DEBUG [main] - Using VFS adapter org.apache.ibatis.io.DefaultVFS
DEBUG [main] - Find JAR URL: file:/E:/%e4%bb%a3%e7%a0%81%e5%ad%98%e6%a1%a3/mybatis/12.mybatis_spring_mapper/target/classes/com/steven/ssm/po
DEBUG [main] - Not a JAR: file:/E:/%e4%bb%a3%e7%a0%81%e5%ad%98%e6%a1%a3/mybatis/12.mybatis_spring_mapper/target/classes/com/steven/ssm/po
DEBUG [main] - Reader entry: User.class
DEBUG [main] - Listing file:/E:/%e4%bb%a3%e7%a0%81%e5%ad%98%e6%a1%a3/mybatis/12.mybatis_spring_mapper/target/classes/com/steven/ssm/po
DEBUG [main] - Find JAR URL: file:/E:/%e4%bb%a3%e7%a0%81%e5%ad%98%e6%a1%a3/mybatis/12.mybatis_spring_mapper/target/classes/com/steven/ssm/po/User.class
DEBUG [main] - Not a JAR: file:/E:/%e4%bb%a3%e7%a0%81%e5%ad%98%e6%a1%a3/mybatis/12.mybatis_spring_mapper/target/classes/com/steven/ssm/po/User.class
DEBUG [main] - Reader entry: ����   3 H
DEBUG [main] - Checking to see if class com.steven.ssm.po.User matches criteria [is assignable to Object]
DEBUG [main] - Parsed configuration file: 'class path resource [config/mybatis/mybatis.xml]'
DEBUG [main] - Parsed mapper file: 'file [E:\代码存档\mybatis\12.mybatis_spring_mapper\target\classes\sqlmap\UserMapper.xml]'
DEBUG [main] - Finished creating instance of bean 'sqlSessionFactory'
DEBUG [main] - Returning cached instance of singleton bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'
DEBUG [main] - Creating shared instance of singleton bean 'userMapper'
DEBUG [main] - Creating instance of bean 'userMapper'
DEBUG [main] - Eagerly caching bean 'userMapper' to allow for resolving potential circular references
DEBUG [main] - Returning cached instance of singleton bean 'sqlSessionFactory'
DEBUG [main] - Invoking afterPropertiesSet() on bean with name 'userMapper'
DEBUG [main] - Finished creating instance of bean 'userMapper'
DEBUG [main] - Returning cached instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
DEBUG [main] - Returning cached instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'
DEBUG [main] - Returning cached instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'
DEBUG [main] - Returning cached instance of singleton bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'
DEBUG [main] - Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerProcessor'
DEBUG [main] - Creating instance of bean 'org.springframework.context.event.internalEventListenerProcessor'
DEBUG [main] - Eagerly caching bean 'org.springframework.context.event.internalEventListenerProcessor' to allow for resolving potential circular references
DEBUG [main] - Finished creating instance of bean 'org.springframework.context.event.internalEventListenerProcessor'
DEBUG [main] - Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerFactory'
DEBUG [main] - Creating instance of bean 'org.springframework.context.event.internalEventListenerFactory'
DEBUG [main] - Eagerly caching bean 'org.springframework.context.event.internalEventListenerFactory' to allow for resolving potential circular references
DEBUG [main] - Finished creating instance of bean 'org.springframework.context.event.internalEventListenerFactory'
DEBUG [main] - Returning cached instance of singleton bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor'
DEBUG [main] - Returning cached instance of singleton bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor'
DEBUG [main] - Returning cached instance of singleton bean 'org.springframework.context.event.internalEventListenerFactory'
DEBUG [main] - Unable to locate LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor@31f9b85e]
DEBUG [main] - Returning cached instance of singleton bean 'lifecycleProcessor'
DEBUG [main] - Returning cached instance of singleton bean 'sqlSessionFactory'
DEBUG [main] - Searching for key 'spring.liveBeansView.mbeanDomain' in [systemProperties]
DEBUG [main] - Searching for key 'spring.liveBeansView.mbeanDomain' in [systemEnvironment]
DEBUG [main] - Could not find key 'spring.liveBeansView.mbeanDomain' in any property source. Returning [null]
DEBUG [main] - Returning cached instance of singleton bean 'userMapper'
DEBUG [main] - Creating a new SqlSession
DEBUG [main] - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3943a2be] was not registered for synchronization because synchronization is not active
DEBUG [main] - Fetching JDBC Connection from DataSource
 INFO [main] - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 2tssb09z12twglj1608ea5|5d47c63f, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 2tssb09z12twglj1608ea5|5d47c63f, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/study?useSSL=false, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
DEBUG [main] - incremented pending_acquires: 1
DEBUG [main] - Starting acquisition series. Incremented pending_acquires [1],  attempts_remaining: 30
DEBUG [main] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@79da8dc5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@1eb5174b
DEBUG [main] - incremented pending_acquires: 2
DEBUG [main] - Starting acquisition series. Incremented pending_acquires [2],  attempts_remaining: 30
DEBUG [main] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@79da8dc5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@67080771
DEBUG [main] - incremented pending_acquires: 3
DEBUG [main] - Starting acquisition series. Incremented pending_acquires [3],  attempts_remaining: 30
DEBUG [main] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@79da8dc5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@72cde7cc
DEBUG [main] - com.mchange.v2.resourcepool.BasicResourcePool@5fd4f8f5 config: [start -> 3; min -> 3; max -> 15; inc -> 3; num_acq_attempts -> 30; acq_attempt_delay -> 1000; check_idle_resources_delay -> 0; mox_resource_age -> 0; max_idle_time -> 0; excess_max_idle_time -> 0; destroy_unreturned_resc_time -> 0; expiration_enforcement_delay -> 0; break_on_acquisition_failure -> false; debug_store_checkout_exceptions -> false]
DEBUG [main] - Created new pool for auth, username (masked): 'ro******'.
DEBUG [main] - acquire test -- pool size: 0; target_pool_size: 3; desired target? 1
DEBUG [main] - awaitAvailable(): [unknown]
DEBUG [main] - trace com.mchange.v2.resourcepool.BasicResourcePool@5fd4f8f5 [managed: 0, unused: 0, excluded: 0]
DEBUG [C3P0PooledConnectionPoolManager[identityToken->2tssb09z12twglj1608ea5|5d47c63f]-HelperThread-#1] - com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager@43a928f5.acquireResource() returning. 
DEBUG [C3P0PooledConnectionPoolManager[identityToken->2tssb09z12twglj1608ea5|5d47c63f]-HelperThread-#2] - com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager@43a928f5.acquireResource() returning. 
DEBUG [C3P0PooledConnectionPoolManager[identityToken->2tssb09z12twglj1608ea5|5d47c63f]-HelperThread-#0] - com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager@43a928f5.acquireResource() returning. 
DEBUG [C3P0PooledConnectionPoolManager[identityToken->2tssb09z12twglj1608ea5|5d47c63f]-HelperThread-#1] - trace com.mchange.v2.resourcepool.BasicResourcePool@5fd4f8f5 [managed: 1, unused: 1, excluded: 0]
DEBUG [C3P0PooledConnectionPoolManager[identityToken->2tssb09z12twglj1608ea5|5d47c63f]-HelperThread-#1] - decremented pending_acquires: 2
DEBUG [C3P0PooledConnectionPoolManager[identityToken->2tssb09z12twglj1608ea5|5d47c63f]-HelperThread-#1] - Acquisition series terminated successfully. Decremented pending_acquires [2],  attempts_remaining: 30
DEBUG [main] - trace com.mchange.v2.resourcepool.BasicResourcePool@5fd4f8f5 [managed: 1, unused: 0, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@10587f22)
DEBUG [C3P0PooledConnectionPoolManager[identityToken->2tssb09z12twglj1608ea5|5d47c63f]-HelperThread-#0] - trace com.mchange.v2.resourcepool.BasicResourcePool@5fd4f8f5 [managed: 2, unused: 1, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@10587f22)
DEBUG [main] - JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@2bfc268b] will not be managed by Spring
DEBUG [C3P0PooledConnectionPoolManager[identityToken->2tssb09z12twglj1608ea5|5d47c63f]-HelperThread-#0] - decremented pending_acquires: 1
DEBUG [C3P0PooledConnectionPoolManager[identityToken->2tssb09z12twglj1608ea5|5d47c63f]-HelperThread-#0] - Acquisition series terminated successfully. Decremented pending_acquires [1],  attempts_remaining: 30
DEBUG [C3P0PooledConnectionPoolManager[identityToken->2tssb09z12twglj1608ea5|5d47c63f]-HelperThread-#2] - trace com.mchange.v2.resourcepool.BasicResourcePool@5fd4f8f5 [managed: 3, unused: 2, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@10587f22)
DEBUG [C3P0PooledConnectionPoolManager[identityToken->2tssb09z12twglj1608ea5|5d47c63f]-HelperThread-#2] - decremented pending_acquires: 0
DEBUG [C3P0PooledConnectionPoolManager[identityToken->2tssb09z12twglj1608ea5|5d47c63f]-HelperThread-#2] - Acquisition series terminated successfully. Decremented pending_acquires [0],  attempts_remaining: 30
DEBUG [main] - ==>  Preparing: select * from user where id=? 
DEBUG [main] - ==> Parameters: 1(Integer)
DEBUG [main] - <==      Total: 1
DEBUG [main] - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3943a2be]
DEBUG [main] - Returning JDBC Connection to DataSource
DEBUG [main] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@79da8dc5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$1RefurbishCheckinResourceTask@24fcf36f
DEBUG [main] - trace com.mchange.v2.resourcepool.BasicResourcePool@5fd4f8f5 [managed: 3, unused: 2, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@10587f22)
User [id=1, username=steven, sex=1, birthday=1991-02-11, address=nanjing]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值