关于spring boot自动注入出现Consider defining a bean of type ‘xxx’ in your configuration问题解决方案

使用springboot搭建项目的时候出现了springboot无法扫描到mapper文件的问题。 经过查找,发现出现这个情况都基本是mapping.xml文件中的namespace路径出现问题,或者是没有指定扫描mapper文件的路径。

解决办法:在启动类上添加@MapperScan(“com.springboot_ssm.mapper”)注解,指定扫描路径

注:给自己日常采坑做个小记录。

更多推荐

关于spring boot自动注入出现Consider defining a bean of type 'xxx' in your conf