Consider defining a bean of type ‘com.XXX.dao.mapper.UserMapper’ in your configuration. 在appliction类上加一个扫描注解 -