(未艾原创)JavaWeb——taotao商城01——4步用spring整合mybatis篇。

JavaWeb——taotao商城01——4步用spring整合mybatis篇。

                         ——未艾丶

    一点前言,请君过目:

首先说好,笔者是一个大概工作2年多接近3年的新人。因为过年,待业在家所以无聊翻了翻网上的项目,看到传智播客的taotao商城无论各方面水平都比较优良。

所以我也自己写了写当做练习,如果看过视频的朋友也可以过来看看我的文章。

因为我只借用了素材和一部分代码,并没有看视频。所以我是顺着他的逻辑一直往下写的,所以和视频中的service层或别的层代码差异比较大的话,你们就看看互相的逻辑差异就好了。

另外比较重要说的是,传智播客的taotao商城视频是用maven写的,虽然这个可以让没出校门的学生学习一下maven,但是对于水平更低的学生来说,这比一般的JavaEE项目更加难理解一些,互相依赖和操作什么的,我就打算直接写一个JavaWeb包,这样如果有水平更新的人,懒得用maven进行编辑的话。那么直接看我的源代码,期望能给你们一些启发,顺便要说的是,我已经尽量把注释写的很全,因为对我来说也是一种复习。

后台框架为:spring-springMVC-Mybatis

前端框架为:jQuery-easyUI

注:转载请注明出处,笔者未艾丶。首发于csdn论坛。

我写的东西肯定和书上的不一样,文字粗鄙一些,接地气一些,绝大多数都是自己的思维和理解,而非书上那种各个情况写明,生硬的语句让你们都不知道工作上应该怎么用,而我在写文章的时候通常都把工作上可能出现的情况尽可能的告诉你们。给你们一些明朗的指示~~来吧,如果有喜欢我文章的请联系我哦~~

 

 

以下开始进行正文:

1.配置环境

所有项目的第一步都是配置环境,假如你的tomcat,myeclipse,mysql,SQLYog都在电脑上之前就布置好的话,那么对你来说任何项目的第一步都仅仅是复制粘贴jar包,对于项目任何人都不要有太大的压力。复制粘贴总不会错吧?


先把常用的jar包放到lib目录下,第一步就结束了。怎么样,很简单吧!如果以后有新的jar包文件需要添加。那么再添加好了。最开始的时候别想那么多。当然。Sql文件导入让我忽略了。这也算是第一步应该做的事情吧。应该不会有人不会导入Sql文件吧- -!!

2.开始用逆向工程或者自己手写出来pojo和mapper文件。当然我比较喜欢从pojo开始,

package com.taotao.pojo;

 

import java.util.Date;

/**

 * @author WweiaiI

 * 2017-1-12上午4:26:35

 * 未艾原创。

 * 愿用一生时间做一个出色的小说家。

 * 会室内设计的喜欢段子和古风的程序员。

 */

public class TbUser {

    private Long id;

 

    private String username;

 

    private String password;

 

    private String phone;

 

    private String email;

 

    private Date created;

 

    private Date updated;

 

    public Long getId() {

        return id;

    }

 

    public void setId(Long id) {

        this.id = id;

    }

 

    public String getUsername() {

        return username;

    }

 

    public void setUsername(String username) {

        this.username = username ==null ?null : username.trim();

    }

 

    public String getPassword() {

        return password;

    }

 

    public void setPassword(String password) {

        this.password = password ==null ?null : password.trim();

    }

 

    public String getPhone() {

        return phone;

    }

 

    public void setPhone(String phone) {

        this.phone = phone ==null ?null : phone.trim();

    }

 

    public String getEmail() {

        return email;

    }

 

    public void setEmail(String email) {

        this.email = email ==null ?null : email.trim();

    }

 

    public Date getCreated() {

        return created;

    }

 

    public void setCreated(Date created) {

        this.created = created;

    }

 

    public Date getUpdated() {

        return updated;

    }

 

    public void setUpdated(Date updated) {

        this.updated = updated;

    }

}

 

package com.taotao.mapper;

 

import com.taotao.pojo.TbUser;

import com.taotao.pojo.TbUserExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;

/**

 * @author WweiaiI

 * 2017-1-12上午4:26:35

 * 未艾原创。

 * 愿用一生时间做一个出色的小说家。

 * 会室内设计的喜欢段子和古风的程序员。

 */

public interface TbUserMapper {

    int countByExample(TbUserExample example);

 

    int deleteByExample(TbUserExample example);

 

    int deleteByPrimaryKey(Long id);

 

    int insert(TbUser record);

 

    int insertSelective(TbUser record);

 

    List<TbUser> selectByExample(TbUserExample example);

 

    TbUser selectByPrimaryKey(Long id);

 

    int updateByExampleSelective(@Param("record") TbUser record, @Param("example") TbUserExample example);

 

    int updateByExample(@Param("record") TbUser record, @Param("example") TbUserExample example);

 

    int updateByPrimaryKeySelective(TbUser record);

 

    int updateByPrimaryKey(TbUser record);

}

 

<?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.taotao.mapper.TbUserMapper">

  <resultMapid="BaseResultMap"type="com.taotao.pojo.TbUser">

    <id column="id" property="id" jdbcType="BIGINT" />

    <resultcolumn="username"property="username"jdbcType="VARCHAR"/>

    <resultcolumn="password"property="password"jdbcType="VARCHAR"/>

    <resultcolumn="phone"property="phone"jdbcType="VARCHAR"/>

    <resultcolumn="email"property="email"jdbcType="VARCHAR"/>

    <resultcolumn="created"property="created"jdbcType="TIMESTAMP"/>

    <resultcolumn="updated"property="updated"jdbcType="TIMESTAMP"/>

  </resultMap>

  <sql id="Example_Where_Clause" >

    <where >

      <foreachcollection="oredCriteria"item="criteria"separator="or">

        <iftest="criteria.valid">

          <trimprefix="("suffix=")"prefixOverrides="and">

            <foreachcollection="criteria.criteria"item="criterion">

              <choose>

                <whentest="criterion.noValue">

                  and ${criterion.condition}

                </when>

                <whentest="criterion.singleValue">

                  and ${criterion.condition} #{criterion.value}

                </when>

                <whentest="criterion.betweenValue">

                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}

                </when>

                <whentest="criterion.listValue">

                  and ${criterion.condition}

                  <foreachcollection="criterion.value"item="listItem"open="("close=")"separator=",">

                    #{listItem}

                  </foreach>

                </when>

              </choose>

            </foreach>

          </trim>

        </if>

      </foreach>

    </where>

  </sql>

  <sql id="Update_By_Example_Where_Clause">

    <where >

      <foreachcollection="example.oredCriteria"item="criteria"separator="or">

        <iftest="criteria.valid">

          <trimprefix="("suffix=")"prefixOverrides="and">

            <foreachcollection="criteria.criteria"item="criterion">

              <choose>

                <whentest="criterion.noValue">

                  and ${criterion.condition}

                </when>

                <whentest="criterion.singleValue">

                  and ${criterion.condition} #{criterion.value}

                </when>

                <whentest="criterion.betweenValue">

                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}

                </when>

                <whentest="criterion.listValue">

                  and ${criterion.condition}

                  <foreachcollection="criterion.value"item="listItem"open="("close=")"separator=",">

                    #{listItem}

                  </foreach>

                </when>

              </choose>

            </foreach>

          </trim>

        </if>

      </foreach>

    </where>

  </sql>

  <sql id="Base_Column_List" >

    id, username, password, phone, email, created, updated

  </sql>

  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.taotao.pojo.TbUserExample">

    select

    <if test="distinct" >

      distinct

    </if>

    <includerefid="Base_Column_List"/>

    from tb_user

    <if test="_parameter != null" >

      <includerefid="Example_Where_Clause"/>

    </if>

    <if test="orderByClause != null" >

      order by ${orderByClause}

    </if>

  </select>

  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">

    select

    <includerefid="Base_Column_List"/>

    from tb_user

    where id = #{id,jdbcType=BIGINT}

  </select>

  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">

    delete from tb_user

    where id = #{id,jdbcType=BIGINT}

  </delete>

  <delete id="deleteByExample" parameterType="com.taotao.pojo.TbUserExample">

    delete from tb_user

    <if test="_parameter != null" >

      <includerefid="Example_Where_Clause"/>

    </if>

  </delete>

  <insert id="insert" parameterType="com.taotao.pojo.TbUser">

    insert into tb_user (id, username, password,

      phone, email, created,

      updated)

    values (#{id,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},

      #{phone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{created,jdbcType=TIMESTAMP},

      #{updated,jdbcType=TIMESTAMP})

  </insert>

  <insert id="insertSelective" parameterType="com.taotao.pojo.TbUser">

    insert into tb_user

    <trim prefix="(" suffix=")" suffixOverrides="," >

      <if test="id != null" >

        id,

      </if>

      <if test="username != null" >

        username,

      </if>

      <if test="password != null" >

        password,

      </if>

      <if test="phone != null" >

        phone,

      </if>

      <if test="email != null" >

        email,

      </if>

      <if test="created != null" >

        created,

      </if>

      <if test="updated != null" >

        updated,

      </if>

    </trim>

    <trim prefix="values (" suffix=")" suffixOverrides="," >

      <if test="id != null" >

        #{id,jdbcType=BIGINT},

      </if>

      <if test="username != null" >

        #{username,jdbcType=VARCHAR},

      </if>

      <if test="password != null" >

        #{password,jdbcType=VARCHAR},

      </if>

      <if test="phone != null" >

        #{phone,jdbcType=VARCHAR},

      </if>

      <if test="email != null" >

        #{email,jdbcType=VARCHAR},

      </if>

      <if test="created != null" >

        #{created,jdbcType=TIMESTAMP},

      </if>

      <if test="updated != null" >

        #{updated,jdbcType=TIMESTAMP},

      </if>

    </trim>

  </insert>

  <select id="countByExample" parameterType="com.taotao.pojo.TbUserExample"resultType="java.lang.Integer">

    select count(*) from tb_user

    <if test="_parameter != null" >

      <includerefid="Example_Where_Clause"/>

    </if>

  </select>

  <update id="updateByExampleSelective" parameterType="map" >

    update tb_user

    <set >

      <if test="record.id != null" >

        id = #{record.id,jdbcType=BIGINT},

      </if>

      <if test="record.username != null">

        username = #{record.username,jdbcType=VARCHAR},

      </if>

      <if test="record.password != null">

        password = #{record.password,jdbcType=VARCHAR},

      </if>

      <if test="record.phone != null" >

        phone = #{record.phone,jdbcType=VARCHAR},

      </if>

      <if test="record.email != null" >

        email = #{record.email,jdbcType=VARCHAR},

      </if>

      <if test="record.created != null" >

        created = #{record.created,jdbcType=TIMESTAMP},

      </if>

      <if test="record.updated != null" >

        updated = #{record.updated,jdbcType=TIMESTAMP},

      </if>

    </set>

    <if test="_parameter != null" >

      <includerefid="Update_By_Example_Where_Clause"/>

    </if>

  </update>

  <update id="updateByExample" parameterType="map" >

    update tb_user

    set id = #{record.id,jdbcType=BIGINT},

      username = #{record.username,jdbcType=VARCHAR},

      password = #{record.password,jdbcType=VARCHAR},

      phone = #{record.phone,jdbcType=VARCHAR},

      email = #{record.email,jdbcType=VARCHAR},

      created = #{record.created,jdbcType=TIMESTAMP},

      updated = #{record.updated,jdbcType=TIMESTAMP}

    <if test="_parameter != null" >

      <includerefid="Update_By_Example_Where_Clause"/>

    </if>

  </update>

  <update id="updateByPrimaryKeySelective"parameterType="com.taotao.pojo.TbUser">

    update tb_user

    <set >

      <if test="username != null" >

        username = #{username,jdbcType=VARCHAR},

      </if>

      <if test="password != null" >

        password = #{password,jdbcType=VARCHAR},

      </if>

      <if test="phone != null" >

        phone = #{phone,jdbcType=VARCHAR},

      </if>

      <if test="email != null" >

        email = #{email,jdbcType=VARCHAR},

      </if>

      <if test="created != null" >

        created = #{created,jdbcType=TIMESTAMP},

      </if>

      <if test="updated != null" >

        updated = #{updated,jdbcType=TIMESTAMP},

      </if>

    </set>

    where id = #{id,jdbcType=BIGINT}

  </update>

  <update id="updateByPrimaryKey" parameterType="com.taotao.pojo.TbUser">

    update tb_user

    set username = #{username,jdbcType=VARCHAR},

      password = #{password,jdbcType=VARCHAR},

      phone = #{phone,jdbcType=VARCHAR},

      email = #{email,jdbcType=VARCHAR},

      created = #{created,jdbcType=TIMESTAMP},

      updated = #{updated,jdbcType=TIMESTAMP}

    where id = #{id,jdbcType=BIGINT}

  </update>

</mapper>

3.前两步其实都相当于在配置环境变量,因为在我心里pojo也是环境变量的一部分。那么此刻我们已经写完了所有需要环境变量的东西了。接下来则开始用spring整合mybatis。我们首先写一个mybatis的总配置类configuration.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> 

     

</configuration>

 

4.既然是用spring整合mybatis,那么我们的mapper和mapper配置已经写好,应该开始写spring的整合内容了。创建ApplicationContext.xml文件。

      ApplicationContext文件一般一开始所有人都会觉得特别复杂,但是我们先一步步来。尤其是要先记住前两步!!!

1)        获取数据库连接池datasource

2)        创建mybatis的工厂SqlSessionFactoryBean

别的啥都不说!努力的人就咬牙使劲记下来先就这两步!所有application文件开头除了引用配置以外,就开始需要这俩。

<!-- 加载配置文件 -->

   <!-- <context:property-placeholder location="classpath:db.properties"/> -->

 

 

 

<!-- 数据库连接池 -->

   <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"destroy-method="close">

      <propertyname="url"value="jdbc:mysql://localhost:3306/mytaotao-db?characterEncoding=utf-8"/>

      <propertyname="username"value="root"/>

      <propertyname="password"value=""/>

      <propertyname="driverClassName"value="com.mysql.jdbc.Driver"/>

      <propertyname="maxActive"value="10"/>

      <propertyname="minIdle"value="5"/>

   </bean>

 

    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> 

        <propertyname="configLocation"value="classpath:configuration.xml"></property> 

        <propertyname="dataSource"ref="dataSource"/> 

    </bean> 

 

3)        我们现在已经得到了SqlSessionFactoryBean相当于我们拿到了所有的mapper文件,既然mapper都得到了,自然就可以往servicce里面注入了。那么我们开始写service文件。

package com.taotao.service.impl;

 

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Service;

 

import com.taotao.mapper.TbUserMapper;

import com.taotao.pojo.TbUser;

import com.taotao.service.UserService;

/**

 * @author WweiaiI

 * 2017-1-12上午4:26:35

 * 未艾原创。

 * 愿用一生时间做一个出色的小说家。

 * 会室内设计的喜欢段子和古风的程序员。

 */

@Service("userService")

public class UserServiceImpl implements UserService {

  

   @Autowired

   TbUserMapper tbUserMapper;

  

   @Override

   public TbUser findbyId(String id) {

      return tbUserMapper.selectByPrimaryKey(Long.valueOf(id));

   }

  

   public TbUserMapper getTbUserMapper() {

      return tbUserMapper;

   }

   public void setTbUserMapper(TbUserMapper tbUserMapper) {

      this.tbUserMapper = tbUserMapper;

   }

 

}

 

 

4)        service文件我们已经写好,上面的tbUserMapper不就是 在等着我们注入呢么!所以现在我们要开始在spring文件中进行注入 。我这里贴的是手动写法,有人有兴趣可以往后翻,我附录里写了@Autowired和@Resource的区别及什么时候分别使用更好,和小诀窍。也写了手动bean的注入方式和自动扫描的注入方式。和我对context:component-scan一些自己的思路和理解。当然我写的东西都是我自己的经验和思考。与教科书上的当然不同!这里先贴出来自动扫描的方式。

<context:component-scanbase-package="com.taotao.service">

      <context:exclude-filtertype="annotation"expression="org.springframework.stereotype.Controller"/>

   </context:component-scan>

<context:annotation-config/>

 

<!-- 这句话本身是用来扫描dao层代码。而mapper就代替了dao层。代替了下面那句话 -->

   <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">

      <propertyname="basePackage"value="com.taotao.mapper"/>

   </bean>

 

5.spring整合mybatis我一共就总结出来了如上5步。看起来是不是特别简单?不过就是配置好所有的环境以后。开始写pojo和mapper的文件,当然,我也说了,这个在我心里也是环境的一部分,你如果做javaEE程序。想干哪方面都缺不了这pojo包。在拿到pojo包的时候我们就可以写一个mybatis的总配置文件。你也看到了,其实总配置文件在最开始整合的时候不过就是搭了个框,什么都不需要写。但是毕竟sqlSessionFactoryBean里面需要注入这个文件。所以必须得写。不然会报错哦朋友们。写完mybatis的总配置文件之后,我们相当于已经把mybatis框架需要的部分写完了,并没有其他乱七八糟的东西。我们写完mybatis部分以后,开始用spring内容整合这一部分。Spring内一共有小4步过程,这小4步还包括了创建service层。主要就是先写好数据源,然后通过数据源得到数据工厂,有工厂才有mapper,有mapper就能对service层进行注入。这个顺序千万不要混淆。Mapper对service层进行注入以后。我们就相当于spring整合完了mybatis。现在我们开始测试。

 

当然我知道很多童鞋们在测试的时候会报很多错误。所以大家可以用一个比较好玩的类名去给测试类命名。这样你们在报错的时候也会开森一些。比方说CaotamadeTest,ErrorNimabi。

我在一开始做不下去的时候,这就是我写代码的动力!我在下面贴上了绝大多数的异常,当然还有一个spring的空指针异常,我弄了半天也没弄出来,就先算了。附录给大家都贴出来了。哦对了。测试的时候看看数据库开没开。要报个connection的异常你去裸奔吧。

package com.taotao.test;

import static org.junit.Assert.*;

 

 

/**

 * @author WweiaiI

 * 2017-1-12上午4:26:35

 * 未艾原创。

 * 愿用一生时间做一个出色的小说家。

 * 会室内设计的喜欢段子和古风的程序员。

 */

import org.junit.Test;

import org.springframework.beans.factory.xml.XmlBeanFactory;

import org.springframework.context.ApplicationContext;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import org.springframework.core.io.ClassPathResource;

import org.springframework.core.io.Resource;

 

import com.taotao.pojo.TbUser;

import com.taotao.service.UserService;

import com.taotao.service.impl.UserServiceImpl;

 

 

public class test {

 

   public void testResource() {

      Resource resource = new ClassPathResource("applicationContext.xml");

      XmlBeanFactory factory = new XmlBeanFactory(resource);

      UserService us = (UserServiceImpl)factory.getBean("userService");//如果没有定义Service的名字,则给他一个类的反射就可以了UserServiceImpl.class

      System.out.println("us"+us.findbyId("7").getUsername());

   }

  

   @Test

   public void testApplicationContext() {

      ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml"); 

       UserService userService = (UserServiceImpl) applicationContext.getBean("userService"); 

       TbUser tbUser = userService.findbyId("7"); 

       System.out.println(tbUser.getEmail());

   }

  

}

 

 

事实上在我学习的时候会有一种文体 就是我的testResource()完全没有任何问题的情况下我的testApplicationContext()会报各种各样奇葩的问题。这原因我到现在都没解决。希望有人明白怎么回事的话,在下面给我留言,后来我遇到这样问题就少了。如果你跟我一样的话,不妨两种先都写出来,有一种没问题的话,那么起码说明连接数据库方面还是没问题的。

 

 

 

 

 

 

 

 

 

附录:

附录:

附录:

(重要的事情重复三遍):

正确情况下得log4j输出(新手看log4j肯定觉得十分繁琐。不好看。但是一定要坚持看下去,看清楚web,spring等等日志的进程,前后顺序,报错与成功信息。不需要多么严格的一字一句读,每次跑tomcat或者测试的时候看一眼就好了。这也是一种学习方法。):

2017-01-12 03:11:42,217 [main] INFO  t.support.ClassPathXmlApplicationContext -Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@48aee668: startup date [Thu Jan 12 03:11:42 CST 2017]; root of context hierarchy

2017-01-12 03:11:42,307 [main] INFO  eans.factory.xml.XmlBeanDefinitionReader -Loading XML bean definitions from class path resource [applicationContext.xml]

2017-01-12 03:11:42,337 [main] DEBUG .beans.factory.xml.DefaultDocumentLoader -Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]

2017-01-12 03:11:42,398 [main] DEBUG eans.factory.xml.PluggableSchemaResolver -Loading schema mappings from [META-INF/spring.schemas]

2017-01-12 03:11:42,408 [main] DEBUG eans.factory.xml.PluggableSchemaResolver -Loaded schema mappings: {http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.0.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/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-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/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.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/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.0.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/mvc/spring-mvc-3.0.xsd=org/springframework/web/servlet/config/spring-mvc-3.0.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/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, 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/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.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/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.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/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-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/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.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/context/spring-context.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.0.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/mvc/spring-mvc.xsd=org/springframework/web/servlet/config/spring-mvc-3.0.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc.xsd=org/springframework/jdbc/config/spring-jdbc-3.0.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/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.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/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.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/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.alibaba.com/schema/stat.xsd=META-INF/stat.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/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd}

2017-01-12 03:11:42,408 [main] DEBUG eans.factory.xml.PluggableSchemaResolver -Found XML schema [http://www.springframework.org/schema/beans/spring-beans-3.0.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.0.xsd

2017-01-12 03:11:42,508 [main] DEBUG eans.factory.xml.PluggableSchemaResolver -Found XML schema [http://www.springframework.org/schema/context/spring-context-3.0.xsd] in classpath: org/springframework/context/config/spring-context-3.0.xsd

2017-01-12 03:11:42,528 [main] DEBUG eans.factory.xml.PluggableSchemaResolver -Found XML schema [http://www.springframework.org/schema/tool/spring-tool-3.0.xsd] in classpath: org/springframework/beans/factory/xml/spring-tool-3.0.xsd

2017-01-12 03:11:42,539 [main] DEBUG .xml.DefaultBeanDefinitionDocumentReader -Loading bean definitions

2017-01-12 03:11:42,579 [main] DEBUG tory.xml.DefaultNamespaceHandlerResolver -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.alibaba.com/schema/stat=com.alibaba.druid.support.spring.stat.config.DruidStatNamespaceHandler, 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/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}

2017-01-12 03:11:42,619 [main] INFO  nnotation.ClassPathBeanDefinitionScanner -JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning

2017-01-12 03:11:42,619 [main] INFO  nnotation.ClassPathBeanDefinitionScanner -JSR-330 'javax.inject.Named' annotation found and supported for component scanning

2017-01-12 03:11:42,639 [main] DEBUG port.PathMatchingResourcePatternResolver -Looking for matching resources in directory tree [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\service]

2017-01-12 03:11:42,639 [main] DEBUG port.PathMatchingResourcePatternResolver -Searching directory [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\service] for files matching pattern [F:/java-WorkSpace/myBitic/WebRoot/WEB-INF/classes/com/taotao/service/**/*.class]

2017-01-12 03:11:42,649 [main] DEBUG port.PathMatchingResourcePatternResolver -Searching directory [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\service\impl] for files matching pattern [F:/java-WorkSpace/myBitic/WebRoot/WEB-INF/classes/com/taotao/service/**/*.class]

2017-01-12 03:11:42,649 [main] DEBUG port.PathMatchingResourcePatternResolver -Resolved location pattern [classpath*:com/taotao/service/**/*.class] to resources [file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\service\impl\UserServiceImpl.class], file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\service\UserService.class]]

2017-01-12 03:11:42,689 [main] DEBUG nnotation.ClassPathBeanDefinitionScanner -Identified candidate component class: file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\service\impl\UserServiceImpl.class]

2017-01-12 03:11:42,739 [main] DEBUG factory.xml.BeanDefinitionParserDelegate -Neither XML 'id' nor 'name' specified - using generated bean name [org.mybatis.spring.mapper.MapperScannerConfigurer#0]

2017-01-12 03:11:42,739 [main] DEBUG eans.factory.xml.XmlBeanDefinitionReader -Loaded 9 bean definitions from location pattern [applicationContext.xml]

2017-01-12 03:11:42,739 [main] DEBUG t.support.ClassPathXmlApplicationContext -Bean factory for org.springframework.context.support.ClassPathXmlApplicationContext@48aee668: org.springframework.beans.factory.support.DefaultListableBeanFactory@6de5d74a: defining beans [dataSource,sqlSessionFactory,userService,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.mybatis.spring.mapper.MapperScannerConfigurer#0]; root of factory hierarchy

2017-01-12 03:11:42,781 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'

2017-01-12 03:11:42,781 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'

2017-01-12 03:11:42,811 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' to allow for resolving potential circular references

2017-01-12 03:11:42,811 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'

2017-01-12 03:11:42,811 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'

2017-01-12 03:11:42,811 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'

2017-01-12 03:11:42,811 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' to allow for resolving potential circular references

2017-01-12 03:11:42,851 [main] DEBUG ctory.support.DefaultListableBeanFactory -Invoking afterPropertiesSet() on bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'

2017-01-12 03:11:42,851 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'

2017-01-12 03:11:42,898 [main] DEBUG port.PathMatchingResourcePatternResolver -Looking for matching resources in directory tree [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper]

2017-01-12 03:11:42,898 [main] DEBUG port.PathMatchingResourcePatternResolver -Searching directory [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper] for files matching pattern [F:/java-WorkSpace/myBitic/WebRoot/WEB-INF/classes/com/taotao/mapper/**/*.class]

2017-01-12 03:11:42,912 [main] DEBUG port.PathMatchingResourcePatternResolver -Resolved location pattern [classpath*:com/taotao/mapper/**/*.class] to resources [file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbContentCategoryMapper.class], file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbContentMapper.class], file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbItemCatMapper.class], file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbItemDescMapper.class], file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbItemMapper.class], file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbItemParamItemMapper.class], file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbItemParamMapper.class], file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbOrderItemMapper.class], file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbOrderMapper.class], file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbOrderShippingMapper.class], file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbUserMapper.class]]

2017-01-12 03:11:42,912 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Identified candidate component class: file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbContentCategoryMapper.class]

2017-01-12 03:11:42,912 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Identified candidate component class: file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbContentMapper.class]

2017-01-12 03:11:42,922 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Identified candidate component class: file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbItemCatMapper.class]

2017-01-12 03:11:42,922 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Identified candidate component class: file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbItemDescMapper.class]

2017-01-12 03:11:42,922 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Identified candidate component class: file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbItemMapper.class]

2017-01-12 03:11:42,922 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Identified candidate component class: file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbItemParamItemMapper.class]

2017-01-12 03:11:42,922 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Identified candidate component class: file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbItemParamMapper.class]

2017-01-12 03:11:42,932 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Identified candidate component class: file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbOrderItemMapper.class]

2017-01-12 03:11:42,932 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Identified candidate component class: file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbOrderMapper.class]

2017-01-12 03:11:42,932 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Identified candidate component class: file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbOrderShippingMapper.class]

2017-01-12 03:11:42,932 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Identified candidate component class: file [F:\java-WorkSpace\myBitic\WebRoot\WEB-INF\classes\com\taotao\mapper\TbUserMapper.class]

2017-01-12 03:11:42,942 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Creating MapperFactoryBean with name 'tbContentCategoryMapper' and 'com.taotao.mapper.TbContentCategoryMapper' mapperInterface

2017-01-12 03:11:42,942 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Creating MapperFactoryBean with name 'tbContentMapper' and 'com.taotao.mapper.TbContentMapper' mapperInterface

2017-01-12 03:11:42,942 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Creating MapperFactoryBean with name 'tbItemCatMapper' and 'com.taotao.mapper.TbItemCatMapper' mapperInterface

2017-01-12 03:11:42,942 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Creating MapperFactoryBean with name 'tbItemDescMapper' and 'com.taotao.mapper.TbItemDescMapper' mapperInterface

2017-01-12 03:11:42,942 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Creating MapperFactoryBean with name 'tbItemMapper' and 'com.taotao.mapper.TbItemMapper' mapperInterface

2017-01-12 03:11:42,942 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Creating MapperFactoryBean with name 'tbItemParamItemMapper' and 'com.taotao.mapper.TbItemParamItemMapper' mapperInterface

2017-01-12 03:11:42,942 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Creating MapperFactoryBean with name 'tbItemParamMapper' and 'com.taotao.mapper.TbItemParamMapper' mapperInterface

2017-01-12 03:11:42,942 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Creating MapperFactoryBean with name 'tbOrderItemMapper' and 'com.taotao.mapper.TbOrderItemMapper' mapperInterface

2017-01-12 03:11:42,942 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Creating MapperFactoryBean with name 'tbOrderMapper' and 'com.taotao.mapper.TbOrderMapper' mapperInterface

2017-01-12 03:11:42,942 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Creating MapperFactoryBean with name 'tbOrderShippingMapper' and 'com.taotao.mapper.TbOrderShippingMapper' mapperInterface

2017-01-12 03:11:42,942 [main] DEBUG g.mapper.MapperScannerConfigurer$Scanner -Creating MapperFactoryBean with name 'tbUserMapper' and 'com.taotao.mapper.TbUserMapper' mapperInterface

2017-01-12 03:11:42,952 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'

2017-01-12 03:11:42,952 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'

2017-01-12 03:11:42,952 [main] INFO  ion.AutowiredAnnotationBeanPostProcessor -JSR-330 'javax.inject.Inject' annotation found and supported for autowiring

2017-01-12 03:11:42,952 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' to allow for resolving potential circular references

2017-01-12 03:11:42,952 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'

2017-01-12 03:11:42,952 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'

2017-01-12 03:11:42,952 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'

2017-01-12 03:11:42,952 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' to allow for resolving potential circular references

2017-01-12 03:11:42,952 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'

2017-01-12 03:11:42,952 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'

2017-01-12 03:11:42,952 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'

2017-01-12 03:11:42,962 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor' to allow for resolving potential circular references

2017-01-12 03:11:42,962 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'

2017-01-12 03:11:42,962 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'org.springframework.context.annotation.internalPersistenceAnnotationProcessor'

2017-01-12 03:11:42,962 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'org.springframework.context.annotation.internalPersistenceAnnotationProcessor'

2017-01-12 03:11:42,962 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'org.springframework.context.annotation.internalPersistenceAnnotationProcessor' to allow for resolving potential circular references

2017-01-12 03:11:42,962 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'org.springframework.context.annotation.internalPersistenceAnnotationProcessor'

2017-01-12 03:11:42,962 [main] DEBUG t.support.ClassPathXmlApplicationContext -Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@4f816407]

2017-01-12 03:11:42,972 [main] DEBUG t.support.ClassPathXmlApplicationContext -Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@387d784d]

2017-01-12 03:11:42,972 [main] INFO  ctory.support.DefaultListableBeanFactory -Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6de5d74a: defining beans [dataSource,sqlSessionFactory,userService,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.mybatis.spring.mapper.MapperScannerConfigurer#0,tbContentCategoryMapper,tbContentMapper,tbItemCatMapper,tbItemDescMapper,tbItemMapper,tbItemParamItemMapper,tbItemParamMapper,tbOrderItemMapper,tbOrderMapper,tbOrderShippingMapper,tbUserMapper]; root of factory hierarchy

2017-01-12 03:11:42,972 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'dataSource'

2017-01-12 03:11:42,972 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'dataSource'

2017-01-12 03:11:43,054 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'dataSource' to allow for resolving potential circular references

2017-01-12 03:11:43,159 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'dataSource'

2017-01-12 03:11:43,159 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'sqlSessionFactory'

2017-01-12 03:11:43,159 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'sqlSessionFactory'

2017-01-12 03:11:43,190 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'sqlSessionFactory' to allow for resolving potential circular references

2017-01-12 03:11:43,200 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'dataSource'

2017-01-12 03:11:43,204 [main] DEBUG ctory.support.DefaultListableBeanFactory -Invoking afterPropertiesSet() on bean with name 'sqlSessionFactory'

2017-01-12 03:11:43,432 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'sqlSessionFactory'

2017-01-12 03:11:43,433 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'userService'

2017-01-12 03:11:43,433 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'userService'

2017-01-12 03:11:43,446 [main] DEBUG ans.factory.annotation.InjectionMetadata -Found injected element on class [com.taotao.service.impl.UserServiceImpl]: ResourceElement for com.taotao.mapper.TbUserMapper com.taotao.service.impl.UserServiceImpl.tbUserMapper

2017-01-12 03:11:43,446 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'userService' to allow for resolving potential circular references

2017-01-12 03:11:43,455 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'userService': ResourceElement for com.taotao.mapper.TbUserMapper com.taotao.service.impl.UserServiceImpl.tbUserMapper

2017-01-12 03:11:43,455 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'tbUserMapper'

2017-01-12 03:11:43,455 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'tbUserMapper'

2017-01-12 03:11:43,481 [main] DEBUG ans.factory.annotation.InjectionMetadata -Found injected element on class [org.mybatis.spring.mapper.MapperFactoryBean]: AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory)

2017-01-12 03:11:43,481 [main] DEBUG ans.factory.annotation.InjectionMetadata -Found injected element on class [org.mybatis.spring.mapper.MapperFactoryBean]: AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate)

2017-01-12 03:11:43,481 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'tbUserMapper' to allow for resolving potential circular references

2017-01-12 03:11:43,499 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbUserMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory)

2017-01-12 03:11:43,502 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'tbContentCategoryMapper'

2017-01-12 03:11:43,502 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'tbContentCategoryMapper'

2017-01-12 03:11:43,503 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'tbContentCategoryMapper' to allow for resolving potential circular references

2017-01-12 03:11:43,503 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbContentCategoryMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory)

2017-01-12 03:11:43,503 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning eagerly cached instance of singleton bean 'tbContentCategoryMapper' that is not fully initialized yet - a consequence of a circular reference

2017-01-12 03:11:43,504 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'tbContentMapper'

2017-01-12 03:11:43,504 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'tbContentMapper'

2017-01-12 03:11:43,504 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'tbContentMapper' to allow for resolving potential circular references

2017-01-12 03:11:43,504 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbContentMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory)

2017-01-12 03:11:43,505 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning eagerly cached instance of singleton bean 'tbContentMapper' that is not fully initialized yet - a consequence of a circular reference

2017-01-12 03:11:43,505 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'tbItemCatMapper'

2017-01-12 03:11:43,505 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'tbItemCatMapper'

2017-01-12 03:11:43,505 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'tbItemCatMapper' to allow for resolving potential circular references

2017-01-12 03:11:43,505 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbItemCatMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory)

2017-01-12 03:11:43,506 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning eagerly cached instance of singleton bean 'tbItemCatMapper' that is not fully initialized yet - a consequence of a circular reference

2017-01-12 03:11:43,506 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'tbItemDescMapper'

2017-01-12 03:11:43,506 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'tbItemDescMapper'

2017-01-12 03:11:43,506 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'tbItemDescMapper' to allow for resolving potential circular references

2017-01-12 03:11:43,506 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbItemDescMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory)

2017-01-12 03:11:43,507 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning eagerly cached instance of singleton bean 'tbItemDescMapper' that is not fully initialized yet - a consequence of a circular reference

2017-01-12 03:11:43,507 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'tbItemMapper'

2017-01-12 03:11:43,507 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'tbItemMapper'

2017-01-12 03:11:43,508 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'tbItemMapper' to allow for resolving potential circular references

2017-01-12 03:11:43,508 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbItemMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory)

2017-01-12 03:11:43,509 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning eagerly cached instance of singleton bean 'tbItemMapper' that is not fully initialized yet - a consequence of a circular reference

2017-01-12 03:11:43,509 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'tbItemParamItemMapper'

2017-01-12 03:11:43,509 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'tbItemParamItemMapper'

2017-01-12 03:11:43,509 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'tbItemParamItemMapper' to allow for resolving potential circular references

2017-01-12 03:11:43,510 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbItemParamItemMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory)

2017-01-12 03:11:43,510 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning eagerly cached instance of singleton bean 'tbItemParamItemMapper' that is not fully initialized yet - a consequence of a circular reference

2017-01-12 03:11:43,510 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'tbItemParamMapper'

2017-01-12 03:11:43,510 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'tbItemParamMapper'

2017-01-12 03:11:43,511 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'tbItemParamMapper' to allow for resolving potential circular references

2017-01-12 03:11:43,511 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbItemParamMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory)

2017-01-12 03:11:43,511 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning eagerly cached instance of singleton bean 'tbItemParamMapper' that is not fully initialized yet - a consequence of a circular reference

2017-01-12 03:11:43,512 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'tbOrderItemMapper'

2017-01-12 03:11:43,512 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'tbOrderItemMapper'

2017-01-12 03:11:43,512 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'tbOrderItemMapper' to allow for resolving potential circular references

2017-01-12 03:11:43,512 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbOrderItemMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory)

2017-01-12 03:11:43,513 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning eagerly cached instance of singleton bean 'tbOrderItemMapper' that is not fully initialized yet - a consequence of a circular reference

2017-01-12 03:11:43,513 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'tbOrderMapper'

2017-01-12 03:11:43,514 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'tbOrderMapper'

2017-01-12 03:11:43,514 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'tbOrderMapper' to allow for resolving potential circular references

2017-01-12 03:11:43,514 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbOrderMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory)

2017-01-12 03:11:43,514 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning eagerly cached instance of singleton bean 'tbOrderMapper' that is not fully initialized yet - a consequence of a circular reference

2017-01-12 03:11:43,515 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating shared instance of singleton bean 'tbOrderShippingMapper'

2017-01-12 03:11:43,515 [main] DEBUG ctory.support.DefaultListableBeanFactory -Creating instance of bean 'tbOrderShippingMapper'

2017-01-12 03:11:43,515 [main] DEBUG ctory.support.DefaultListableBeanFactory -Eagerly caching bean 'tbOrderShippingMapper' to allow for resolving potential circular references

2017-01-12 03:11:43,516 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbOrderShippingMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory)

2017-01-12 03:11:43,517 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning eagerly cached instance of singleton bean 'tbOrderShippingMapper' that is not fully initialized yet - a consequence of a circular reference

2017-01-12 03:11:43,517 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning eagerly cached instance of singleton bean 'tbUserMapper' that is not fully initialized yet - a consequence of a circular reference

2017-01-12 03:11:43,519 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'sqlSessionFactory'

2017-01-12 03:11:43,520 [main] DEBUG ion.AutowiredAnnotationBeanPostProcessor -Autowiring by type from bean name 'tbOrderShippingMapper' to bean named 'sqlSessionFactory'

2017-01-12 03:11:43,537 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbOrderShippingMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate)

2017-01-12 03:11:43,538 [main] DEBUG ctory.support.DefaultListableBeanFactory -Invoking afterPropertiesSet() on bean with name 'tbOrderShippingMapper'

2017-01-12 03:11:43,780 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'tbOrderShippingMapper'

2017-01-12 03:11:43,780 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'sqlSessionFactory'

2017-01-12 03:11:43,780 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbOrderMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate)

2017-01-12 03:11:43,780 [main] DEBUG ctory.support.DefaultListableBeanFactory -Invoking afterPropertiesSet() on bean with name 'tbOrderMapper'

2017-01-12 03:11:43,880 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'tbOrderMapper'

2017-01-12 03:11:43,880 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'sqlSessionFactory'

2017-01-12 03:11:43,880 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbOrderItemMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate)

2017-01-12 03:11:43,880 [main] DEBUG ctory.support.DefaultListableBeanFactory -Invoking afterPropertiesSet() on bean with name 'tbOrderItemMapper'

2017-01-12 03:11:43,985 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'tbOrderItemMapper'

2017-01-12 03:11:43,985 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'sqlSessionFactory'

2017-01-12 03:11:43,985 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbItemParamMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate)

2017-01-12 03:11:43,986 [main] DEBUG ctory.support.DefaultListableBeanFactory -Invoking afterPropertiesSet() on bean with name 'tbItemParamMapper'

2017-01-12 03:11:44,057 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'tbItemParamMapper'

2017-01-12 03:11:44,057 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'sqlSessionFactory'

2017-01-12 03:11:44,057 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbItemParamItemMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate)

2017-01-12 03:11:44,057 [main] DEBUG ctory.support.DefaultListableBeanFactory -Invoking afterPropertiesSet() on bean with name 'tbItemParamItemMapper'

2017-01-12 03:11:44,137 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'tbItemParamItemMapper'

2017-01-12 03:11:44,137 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'sqlSessionFactory'

2017-01-12 03:11:44,137 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbItemMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate)

2017-01-12 03:11:44,137 [main] DEBUG ctory.support.DefaultListableBeanFactory -Invoking afterPropertiesSet() on bean with name 'tbItemMapper'

2017-01-12 03:11:44,207 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'tbItemMapper'

2017-01-12 03:11:44,217 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'sqlSessionFactory'

2017-01-12 03:11:44,217 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbItemDescMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate)

2017-01-12 03:11:44,217 [main] DEBUG ctory.support.DefaultListableBeanFactory -Invoking afterPropertiesSet() on bean with name 'tbItemDescMapper'

2017-01-12 03:11:44,269 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'tbItemDescMapper'

2017-01-12 03:11:44,269 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'sqlSessionFactory'

2017-01-12 03:11:44,269 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbItemCatMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate)

2017-01-12 03:11:44,269 [main] DEBUG ctory.support.DefaultListableBeanFactory -Invoking afterPropertiesSet() on bean with name 'tbItemCatMapper'

2017-01-12 03:11:44,309 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'tbItemCatMapper'

2017-01-12 03:11:44,309 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'sqlSessionFactory'

2017-01-12 03:11:44,309 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbContentMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate)

2017-01-12 03:11:44,309 [main] DEBUG ctory.support.DefaultListableBeanFactory -Invoking afterPropertiesSet() on bean with name 'tbContentMapper'

2017-01-12 03:11:44,359 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'tbContentMapper'

2017-01-12 03:11:44,359 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'sqlSessionFactory'

2017-01-12 03:11:44,359 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbContentCategoryMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate)

2017-01-12 03:11:44,369 [main] DEBUG ctory.support.DefaultListableBeanFactory -Invoking afterPropertiesSet() on bean with name 'tbContentCategoryMapper'

2017-01-12 03:11:44,409 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'tbContentCategoryMapper'

2017-01-12 03:11:44,409 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'sqlSessionFactory'

2017-01-12 03:11:44,409 [main] DEBUG ans.factory.annotation.InjectionMetadata -Processing injected method of bean 'tbUserMapper': AutowiredMethodElement for public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate)

2017-01-12 03:11:44,409 [main] DEBUG ctory.support.DefaultListableBeanFactory -Invoking afterPropertiesSet() on bean with name 'tbUserMapper'

2017-01-12 03:11:44,449 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'tbUserMapper'

2017-01-12 03:11:44,463 [main] DEBUG ctory.support.DefaultListableBeanFactory -Finished creating instance of bean 'userService'

2017-01-12 03:11:44,463 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'

2017-01-12 03:11:44,463 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'org.springframework.context.annotation.internalPersistenceAnnotationProcessor'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'tbContentCategoryMapper'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'tbContentMapper'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'tbItemCatMapper'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'tbItemDescMapper'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'tbItemMapper'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'tbItemParamItemMapper'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'tbItemParamMapper'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'tbOrderItemMapper'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'tbOrderMapper'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'tbOrderShippingMapper'

2017-01-12 03:11:44,464 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'tbUserMapper'

2017-01-12 03:11:44,467 [main] DEBUG t.support.ClassPathXmlApplicationContext -Unable to locate LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor@7088daa7]

2017-01-12 03:11:44,468 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'lifecycleProcessor'

2017-01-12 03:11:44,474 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'sqlSessionFactory'

2017-01-12 03:11:44,474 [main] DEBUG ctory.support.DefaultListableBeanFactory -Returning cached instance of singleton bean 'userService'

2017-01-12 03:11:44,486 [main] DEBUG ramework.jdbc.datasource.DataSourceUtils -Fetching JDBC Connection from DataSource

2017-01-12 03:11:44,615 [main] INFO  com.alibaba.druid.pool.DruidDataSource   -{dataSource-1} inited

2017-01-12 03:11:44,886 [main] DEBUG ramework.jdbc.datasource.DataSourceUtils -Returning JDBC Connection to DataSource

 

 

温馨提示各位可爱的童鞋:如果测试的话,最好把所有的事务都注释掉。否则你有可能会报下面这个错误。

温馨提示各位可爱的童鞋::如果测试的时候applicationContext文件的路径错误则报以下异常:

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-dao.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-dao.xml] cannot be opened because it does not exist

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)

    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)

    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)

    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)

    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)

    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)

    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)

    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)

    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)

    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)

    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)

    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)

    at com.taotao.test.test.testApplicationContext(test.java:30)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:601)

    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

    at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)

    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)

    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)

    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Caused by: java.io.FileNotFoundException: class path resource [applicationContext-dao.xml] cannot be opened because it does not exist

    at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:157)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)

    ... 36 more

 

 

温馨提示各位可爱的童鞋:如果ServiceImpl的文件里@Service("userService")后面的括号内容忘记写了,则可能报以下错误。当然你也可以像我一样的让spring去自动扫描,这里主要是手动<bean id=”XXXXXXXX”>这种类型,或者没有定义Service名字的时候,

有的时候如果你的注入方式错误的话也可能会报以下异常,例如@Autowired和@Resource的区别会报以下错误顺便贴上@Autowired和@Resource的区别:

@Resource的作用相当于@Autowired,只不过@AutowiredbyType自动注入,而@Resource默认按 byName自动注入罢了。@Resource有两个属性是比较重要的,分是nametypeSpring@Resource注解的name属性解析为bean的名字,而type属性则解析为bean的类型。所以如果使用name属性,则使用byName的自动注入策略,而使用type属性时则使用byType自动注入策略。如果既不指定name也不指定type属性,这时将通过反射机制使用byName自动注入策略。
@Resource装配顺序
1. 如果同时指定了nametype,则从Spring上下文中找到唯一匹配的bean进行装配,找不到则抛出异常
2. 如果指定了name,则从上下文中查找名称(id)匹配的bean进行装配,找不到则抛出异常
3. 如果指定了type,则从上下文中找到类型匹配的唯一bean进行装配,找不到或者找到多个,都会抛出异常
4. 如果既没有指定name,又没有指定type,则自动按照byName方式进行装配;如果没有匹配,则回退为一个原始类型进行匹配,如果匹配则自动装配; 

如果你想简单点记,就是在自动扫描的情况下,你的@Service(“”)里面定义了一个Service名字的话就用@Autowied,如果没有定义名字的话就用@Resource。看清楚了!我没有写错,我最初就是这么记的!我没有写错!我没有写错,一般自动扫描的情况下,请给service一个名字吧。以后没准用得着。当然,向我文章里说的,如果不给也没有关系。但是写法会比较怪异。

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'userService' is defined

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1094)

    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:276)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)

    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1075)

    at com.taotao.test.test.testApplicationContext(test.java:31)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:601)

    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

    at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)

    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)

    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)

    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

 

 

温馨提示各位可爱的童鞋:最古老的手动service和mapper的写法为(如下):其实正常可以先用这种方式测试一下,看看你的datasource配置怎么样,然后再改成让spring自动扫描的方式。这里的方法显而易见,以后你得添加无数的xxxxxxxService和xxxxxxxMapper,而且每个都得这么写,不光是代码量很多,重复,很烦,而且对于性能的要求也并不好,出错率也更高,所以在公司的时候一般都用自动扫描的方式去写代码,对了,多说一句,一般情况下每个spring的注解注入,哪怕不需要setter方法的时候也最好添加上,就当给自己买了个便宜的保险。

<bean id="userService" class="com.taotao.service.impl.UserServiceImpl"> 

       <property name="tbUserMapper" ref="userMapper"></property> 

</bean>

<bean id="userMapper" class="org.mybatis.spring.mapper.MapperFactoryBean"> 

       <property name="mapperInterface" value="com.taotao.mapper.TbUserMapper"></property> 

       <property name="sqlSessionFactory" ref="sqlSessionFactory"></property> 

</bean>

 

 

以上分别是手动的添加userService并且命名,这种情况下就不需要在@Service后面写参数重新命名了,不过写上也不会报错,但是最好还是不要写了,以免一些未知错误。

以下是代替的自动扫描写法:

<!-- 这句话本身是用来扫描dao层代码。而mapper就代替了dao层。代替了下面那句话 -->

   <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">

      <propertyname="basePackage"value="com.taotao.mapper"/>

   </bean>

 

<context:component-scanbase-package="com.taotao.service">

      <context:exclude-filtertype="annotation"expression="org.springframework.stereotype.Controller"/>

   </context:component-scan>

<context:annotation-config/>

 

 

 

 

其实很多人在写到这里的时候就忽略了其中的context:exclude-filter,诚然我看到了很多人的代码没有这句话(抛出expression里面的类注释,写全类名就可以,并不扫描,与这个相对的还有一个include。),很多人不写这句话也不会报错,这是我看过不少别人代码发现的问题,不过我自己的机器就会报以下错误:

 

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'userService' is defined

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1094)

    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:276)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)

    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1075)

    at com.taotao.test.test.testApplicationContext(test.java:31)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:601)

    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

    at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)

    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)

    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)

    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

 

 

值得一提的是,事实上spring文件里的自动扫描和手动bean输入service,在测试的时候并不会报错和冲突。不过建议大家尽量在自动扫描的时候不要手动输入。

 

如果忘记扫描Mapper则会报以下错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServiceImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.taotao.mapper.TbUserMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, authenticationType=CONTAINER, lookup=)}

    at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:300)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)

    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)

    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)

    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)

    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)

    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)

    at com.taotao.test.test.testApplicationContext(test.java:30)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:601)

    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

    at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)

    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)

    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)

    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.taotao.mapper.TbUserMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, authenticationType=CONTAINER, lookup=)}

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:924)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:793)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)

    at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:431)

    at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:409)

    at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:541)

    at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:147)

    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)

    at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:297)

    ... 36 more

 

 

自动扫描或手动添加<bean>的Mapper异常:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'userMapper' while setting bean property 'tbUserMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'userMapper' is defined

    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)

    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)

    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)

    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)

    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)

    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)

    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)

    at com.taotao.test.test.testApplicationContext(test.java:30)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:601)

    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

    at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)

    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)

    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)

    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'userMapper' is defined

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1094)

    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:276)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)

    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)

    ... 38 more

 

 

 

童鞋。看完了整合如何啊?

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值