使用@Mapping会报出如下错误
当出现
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type '****.SysUserMapper' in your configuration.
错误时,一般来说,都是注解无效。
而这里无效的原因,有可能为mybatis和mybatis-spring的版本不够高
因为 Mapper来自mybatis-3.5.3.jar包 MapperScan来自mybatis-spring-2.0.3.jar包
还有可能@Mapping引入不到为@MappingScan的原因