Parameter Maps collection does not contain value for java.lang.String
Caused by:java.lang.IllegalArgumentException:ParameterMaps collection does not contain value forjava.lang.String
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:1054)
at org.apache.ibatis.session.Configuration.getParameterMap(Configuration.java:783)
at org.apache.ibatis.builder.MapperBuilderAssistant.getStatementParameterMap(MapperBuilderAssistant.java:368)
at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:291)
at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:113)
at org.apache.ibatis.session.Configuration.lambda$buildAllStatements$2(Configuration.java:905)
at java.util.Collection.removeIf(UnknownSource)
at org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:904)
at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:881)
at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:876)
at org.apache.ibatis.binding.MapperMethod$SqlCommand.resolveMappedStatement(MapperMethod.java:257)
at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:227)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:53)
at org.apache.ibatis.binding.MapperProxy.lambda$cachedInvoker$0(MapperProxy.java:108)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(UnknownSource)
at org.apache.ibatis.util.MapUtil.computeIfAbsent(MapUtil.java:35)
at org.apache.ibatis.binding.MapperProxy.cachedInvoker(MapperProxy.java:95)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
at com.sun.proxy.$Proxy116.getAllXtcsList_xtcs(UnknownSource)
at com.oumasoft.ahxkjhpt.common.initialization.SpringBootInitialization.readXtcs(SpringBootInitialization.java:52)
at com.oumasoft.ahxkjhpt.common.initialization.SpringBootInitialization.setServletContext(SpringBootInitialization.java:41)
at org.springframework.web.context.support.ServletContextAwareProcessor.postProcessBeforeInitialization(ServletContextAwareProcessor.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:429)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1780)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:609)...61 common frames omitted
错误代码
<selectid="selectWgxxbByZwh"parameterMap="java.lang.String">
SELECT * FROM t_wgxxb where zwh = #{zwh}
</select>
正确代码
<selectid="selectWgxxbByZwh"parameterType="java.lang.String">
SELECT * FROM t_wgxxb where zwh = #{zwh}
</select>