title: Could not find parameter map java.lang.Integer
body: <pre><code>org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map java.lang.Integer
  at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementParameterMap(MapperBuilderAssistant.java:319)
  at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:283)
  at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:107)
  at org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:698)
  at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:668)
  at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:663)
  at org.apache.ibatis.binding.MapperMethod$SqlCommand.&lt;init&gt;(MapperMethod.java:180)
  at org.apache.ibatis.binding.MapperMethod.&lt;init&gt;(MapperMethod.java:43)
  at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:58)
  at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:51)
  at com.sun.proxy.$Proxy57.selectListForType(Unknown Source)
  at com.jhp.service.impl.DocumentServiceImpl.getListForType(DocumentServiceImpl.java:23)
  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:606)
  at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
  at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98)
  at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262)
  at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
  at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
  at com.sun.proxy.$Proxy58.getListForType(Unknown Source)
  at com.jhp.service.Impl.DocumentServiceImplTest.getListForType(DocumentServiceImplTest.java:20)
  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:606)
  at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
  at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:200)
  at org.springframework.test.context.testng.AbstractTestNGSpringContextTests.run(AbstractTestNGSpringContextTests.java:172)
  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:606)
  at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:212)
  at org.testng.internal.Invoker.invokeMethod(Invoker.java:707)
  at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
  at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
  at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
  at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
  at org.testng.TestRunner.privateRun(TestRunner.java:767)
  at org.testng.TestRunner.run(TestRunner.java:617)
  at org.testng.SuiteRunner.runTest(SuiteRunner.java:335)
  at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:330)
  at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
  at org.testng.SuiteRunner.run(SuiteRunner.java:240)
  at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
  at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
  at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
  at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
  at org.testng.TestNG.run(TestNG.java:1057)
  at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
  at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
  at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
  </code></pre>
  
  <p>Caused by: java.lang.IllegalArgumentException: Parameter Maps collection does not contain value for java.lang.Integer
      at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:797)
      at org.apache.ibatis.session.Configuration.getParameterMap(Configuration.java:570)
      at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementParameterMap(MapperBuilderAssistant.java:317)
      ... 56 more</p>
  
  <p><strong>spring-context-mybatis.xml</strong></p>
  
  <pre><code>&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:jdbc="http://www.springframework.org/schema/jdbc"  
  xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
  xsi:schemaLocation="
      http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
      http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.0.xsd
      http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.0.xsd
      http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd"
  default-lazy-init="true"&gt;
  
  &lt;description&gt;Mybatis Configuration&lt;/description&gt;
  
  &lt;context:property-placeholder ignore-unresolvable="true" location="classpath*:/conf/jdbc.properties" /&gt;
  
  &lt;bean id="sessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"&gt;
      &lt;property name="dataSource" ref="dataSource"/&gt;
      &lt;property name="typeAliasesPackage" value="com.jhp"/&gt;
      &lt;property name="mapperLocations" value="classpath*:/com/jhp/dao/mapping/*Mapper.xml"/&gt;
      &lt;property name="plugins"&gt;
          &lt;array&gt;
              &lt;bean class="com.github.pagehelper.PageHelper"&gt;
                  &lt;property name="properties"&gt;
                      &lt;value&gt;
                          dialect=mysql
                          offsetAsPageNum=true
                          rowBoundsWithCount=true
                          pageSizeZero=true
                          reasonable=true
                      &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"&gt;
      &lt;property name="basePackage" value="com.jhp.dao" /&gt;
      &lt;property name="sqlSessionFactoryBeanName" value="sessionFactory" /&gt;
  &lt;/bean&gt;
  &lt;bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"&gt;
     &lt;property name="dataSource" ref="dataSource" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>DocumentMapper.xml</strong></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="com.jhp.dao.DocumentMapper" &gt;
  
  
  &lt;resultMap id="BaseResultMap" type="com.jhp.model.Document" &gt;
  &lt;id column="id" property="id" jdbcType="INTEGER" /&gt;
  &lt;result column="content" property="content" jdbcType="VARCHAR" /&gt;
  &lt;result column="type" property="type" jdbcType="TINYINT" /&gt;
  &lt;result column="create_time" property="createTime" jdbcType="INTEGER" /&gt;
  &lt;result column="update_time" property="updateTime" jdbcType="INTEGER" /&gt;
  &lt;result column="shielded" property="shielded" jdbcType="TINYINT" /&gt;
  &lt;/resultMap&gt;
  &lt;resultMap type="com.jhp.dto.DocumentForListDTO" id="ListResultMap"&gt;
      &lt;id column="id" property="id" jdbcType="INTEGER" /&gt;
      &lt;result column="content" property="content" jdbcType="VARCHAR" /&gt;   
  &lt;/resultMap&gt;
  
  &lt;select id="selectListForType" resultMap="ListResultMap" parameterType="java.lang.Integer"&gt;
      select id, content
      from document where shielded = 1 and type = #{type}
  &lt;/select&gt;
  &lt;/mapper&gt;
  </code></pre>