报错代码:
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.chen.as.manager.intf.AliSmsService.sendRCode] with root cause
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
ApiApplication中的:原来的
然后使用接口测试报错:
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.chen.as.manager.intf.AliSmsService.sendRCode] with root cause
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
然后换成:
完美解决!
得到了验证码.
还有好几种解决方式:
检查自己的注解注入:
看看是否漏写,(不会吧不会吧还真有人漏写)
检查实现类,有没有加@Service
如果你你还是没有得到你想要的答案:请仔细检查你的代码!!自己检查出来的错误!!印象会十分深刻!!!