当你的程序执行到service实现层mapper方法调用的时候报如下的错:
o.a.catalina.core.ContainerBase.[Tomcat].[localhost].[/demo].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [/demo] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'userName' not found. Available parameters are [arg1, arg0, param1, param2]] with root cause
大致情况为
此处userName为空
所以只需要