1. 程式人生 > >springboot整合mybatis mapper注入時顯示could not autowire的解決

springboot整合mybatis mapper注入時顯示could not autowire的解決

springboot整合mybatis mapper注入時顯示could not autowire的錯誤,不影響使用,但是看著不爽,如下圖:
錯誤提示

解決方法,在mapper加一個註解。如下圖所示:
@Component(value = “userMapper”)
解決方案