Unsatisfied dependency expressed through field ‘buildingService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘buildingServiceImpl’:
经常在springboot运行的时候会碰到这个无法注入的问题,重点看下面的日志关于Mapper开头的信息
然后就定位到了mapper类和mapper.xml文件,对比是因为两个方法重名了,太粗心。
总结:以后一般注入不进去的mapper类,一般都是方法名,占位符,或者逗号之类的问题,记得检查清楚这里的语法,不然又浪费时间。
版权声明:本文为qq_37135231原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。