title: I get some issue when I set up my project with spring+springmvc+mybatis
body: <p>Dao:</p>
  
  <pre><code>@Repository
  public interface UserDao {
      int searchAccount(String account);
      int getPurview(User user);
  }
  </code></pre>
  
  <p>Service:</p>
  
  <pre><code>public interface LoginService {
      int judgeForUser(User user);
      boolean searchAccount(String account);
  }
  </code></pre>
  
  <p>ServiceImpl:</p>
  
  <pre><code>@Service
  public class LoginServiceImp implements LoginService {
  
      @Resource
      private UserDao userDao;
  
      @Override
      public boolean searchAccount(String account) {
          if (userDao.searchAccount(account) == 1){
              return true;
          }
          return false;
      }
  
      @Override
      public int judgeForUser(User user) {
          return userDao.getPurview(user);
      }
  }
  </code></pre>
  
  <p>mapping:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!DOCTYPE mapper
          PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          "http://mybatis.org/dtd/mybatis-3-mapper.dtd"&gt;
  &lt;mapper namespace="dao.UserDao"&gt;
  
      &lt;select id="searchAccount" parameterType="String" resultType="int"&gt;
          select 1 from users where account = #{account} limit 1
      &lt;/select&gt;
  
      &lt;select id="getPurview" parameterType="model.User"&gt;
          select purview from users where account = #{account} and password = #{password}
      &lt;/select&gt;
  
  &lt;/mapper&gt;
  </code></pre>
  
  <p>web.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
           version="3.1"&gt;
      &lt;display-name&gt;Archetype Created Web Application&lt;/display-name&gt;
  
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;classpath:spring-mybatis.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;!-- Spring MVC servlet --&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;mvc&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
              &lt;param-value&gt;classpath:mvc-servlet.xml&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
          &lt;async-supported&gt;true&lt;/async-supported&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;mvc&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
      &lt;filter&gt;
          &lt;filter-name&gt;encodingFilter&lt;/filter-name&gt;
          &lt;filter-class&gt;org.springframework.web.filter.CharacterEncodingFilter&lt;/filter-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;encoding&lt;/param-name&gt;
              &lt;param-value&gt;UTF-8&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;forceEncoding&lt;/param-name&gt;
              &lt;param-value&gt;true&lt;/param-value&gt;
          &lt;/init-param&gt;
      &lt;/filter&gt;
      &lt;filter-mapping&gt;
          &lt;filter-name&gt;encodingFilter&lt;/filter-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/filter-mapping&gt;
  
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.util.IntrospectorCleanupListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;session-config&gt;
          &lt;session-timeout&gt;15&lt;/session-timeout&gt;
      &lt;/session-config&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>mvc-servlet.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:mvc="http://www.springframework.org/schema/mvc"
         xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd   http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"&gt;
  
      &lt;context:component-scan base-package="controller"/&gt;
  
      &lt;mvc:default-servlet-handler/&gt;
  
      &lt;mvc:annotation-driven/&gt;
  
      &lt;bean id="viewResolver" class="org.thymeleaf.spring4.view.ThymeleafViewResolver"
            p:templateEngine-ref="templateEngine"
            p:characterEncoding="UTF-8"/&gt;
  
      &lt;bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine"&gt;
          &lt;property name="templateResolvers"&gt;
              &lt;set&gt;
                  &lt;ref bean="templateResolver"/&gt;
              &lt;/set&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;bean id="templateResolver" class="org.thymeleaf.spring4.templateresolver.SpringResourceTemplateResolver"
            p:prefix="/WEB-INF/pages/"
            p:templateMode="HTML"/&gt;
  
      &lt;bean class="org.thymeleaf.spring4.view.ThymeleafViewResolver"&gt;
          &lt;property name="templateEngine" ref="templateEngine"/&gt;
          &lt;property name="characterEncoding" value="UTF-8"/&gt;
      &lt;/bean&gt;
  
      &lt;bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"&gt;
          &lt;property name="messageConverters"&gt;
              &lt;list&gt;
                  &lt;ref bean="jsonHttpMessageConverter"/&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;bean id="jsonHttpMessageConverter"
            class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"&gt;
          &lt;property name="supportedMediaTypes"&gt;
              &lt;list&gt;
                  &lt;value&gt;application/json;charset=UTF-8&lt;/value&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"
            p:maxInMemorySize="3000000"/&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>spring-mybatis.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"&gt;
  
      &lt;context:component-scan base-package="dao"/&gt;
      &lt;context:component-scan base-package="mapping"/&gt;
      &lt;context:component-scan base-package="service"/&gt;
  
      &lt;bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
          &lt;property name="location" value="classpath:dbconfig.properties"/&gt;
      &lt;/bean&gt;
  
      &lt;bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close"
            p:url="${jdbc.url}"
            p:username="${jdbc.username}"
            p:password="${jdbc.password}"
            p:filters="stat"
            p:maxActive="8"
            p:initialSize="1"
            p:maxWait="60000"
            p:minIdle="1"
            p:timeBetweenEvictionRunsMillis="60000"
            p:minEvictableIdleTimeMillis="30000"
            p:validationQuery="SELECT 'x'"
            p:testWhileIdle="true"
            p:testOnBorrow="false"
            p:testOnReturn="false"/&gt;
  
      &lt;bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"&gt;
          &lt;property name="dataSource" ref="dataSource"/&gt;
          &lt;property name="mapperLocations" value="classpath:mapping/*.xml"/&gt;
          &lt;property name="plugins"&gt;
              &lt;array&gt;
                  &lt;bean class="com.github.pagehelper.PageInterceptor"&gt;
                      &lt;property name="properties"&gt;
                          &lt;value&gt;
                              helperDialect=mysql
                          &lt;/value&gt;
                      &lt;/property&gt;
                  &lt;/bean&gt;
              &lt;/array&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"
            p:basePackage="dao"
            p:sqlSessionFactoryBeanName="sqlSessionFactory"/&gt;
  
      &lt;bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
            p:dataSource-ref="dataSource"/&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>when I run it. it show this error, I do not know why it can't creating the bean?!</p>
  
  <p>error:</p>
  
  <blockquote>
    <p>org.springframework.web.context.ContextLoader.initWebApplicationContext
    Context initialization failed 
    org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'listViewServiceImp': Injection of resource
    dependencies failed; nested exception is
    org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'IListViewDao' defined in file
    [/Users/Mario.Hu/Documents/mybatis/target/mybatis-1.0-SNAPSHOT/WEB-INF/classes/dao/IListViewDao.class]:
    Cannot resolve reference to bean 'sqlSessionFactory' while setting
    bean property 'sqlSessionFactory'; nested exception is
    org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'sqlSessionFactory' defined in class path
    resource [spring-mybatis.xml]: Initialization of bean failed; nested
    exception is org.springframework.beans.TypeMismatchException: Failed
    to convert property value of type 'java.lang.String' to required type
    'org.springframework.core.io.Resource[]' for property
    'mapperLocations'; nested exception is
    java.lang.IllegalArgumentException: Could not resolve resource
    location pattern [classpath:mapping/<em>.xml]: class path resource
    [mapping/] cannot be resolved to URL because it does not exist    at
    org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:321)
      at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
    Caused by: org.springframework.beans.factory.BeanCreationException:
    Error creating bean with name 'IListViewDao' defined in file
    [/Users/Mario.Hu/Documents/mybatis/target/mybatis-1.0-SNAPSHOT/WEB-INF/classes/dao/IListViewDao.class]:
    Cannot resolve reference to bean 'sqlSessionFactory' while setting
    bean property 'sqlSessionFactory'; nested exception is
    org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'sqlSessionFactory' defined in class path
    resource [spring-mybatis.xml]: Initialization of bean failed; nested
    exception is org.springframework.beans.TypeMismatchException: Failed
    to convert property value of type 'java.lang.String' to required type
    'org.springframework.core.io.Resource[]' for property
    'mapperLocations'; nested exception is
    java.lang.IllegalArgumentException: Could not resolve resource
    location pattern [classpath:mapping/</em>.xml]: class path resource
    [mapping/] cannot be resolved to URL because it does not exist    at
    org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
    Caused by: org.springframework.beans.factory.BeanCreationException:
    Error creating bean with name 'sqlSessionFactory' defined in class
    path resource [spring-mybatis.xml]: Initialization of bean failed;
    nested exception is org.springframework.beans.TypeMismatchException:
    Failed to convert property value of type 'java.lang.String' to
    required type 'org.springframework.core.io.Resource[]' for property
    'mapperLocations'; nested exception is
    java.lang.IllegalArgumentException: Could not resolve resource
    location pattern [classpath:mapping/<em>.xml]: class path resource
    [mapping/] cannot be resolved to URL because it does not exist    at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)
    Caused by: org.springframework.beans.TypeMismatchException: Failed to
    convert property value of type 'java.lang.String' to required type
    'org.springframework.core.io.Resource[]' for property
    'mapperLocations'; nested exception is
    java.lang.IllegalArgumentException: Could not resolve resource
    location pattern [classpath:mapping/</em>.xml]: class path resource
    [mapping/] cannot be resolved to URL because it does not exist    at
    org.springframework.beans.AbstractNestablePropertyAccessor.convertIfNecessary(AbstractNestablePropertyAccessor.java:610)
    Caused by: java.lang.IllegalArgumentException: Could not resolve
    resource location pattern [classpath:mapping/*.xml]: class path
    resource [mapping/] cannot be resolved to URL because it does not
    exist     at
    org.springframework.core.io.support.ResourceArrayPropertyEditor.setAsText(ResourceArrayPropertyEditor.java:116)
    27-May-2017 23:35:23.398 严重 [RMI TCP Connection(2)-127.0.0.1]
    org.apache.catalina.core.StandardContext.startInternal One or more
    listeners failed to start. Full details will be found in the
    appropriate container log file 27-May-2017 23:35:23.420 严重 [RMI TCP
    Connection(2)-127.0.0.1]
    org.apache.catalina.core.StandardContext.startInternal Context []
    startup failed due to previous errors</p>
  </blockquote>
  
  <p>why? I follow other people to build these code! but it can't work for me!</p>