private SysUserMapper userMapper 这个没法用
在SysUserMApper接口上面添加一个
@Repository
就行了
@MapperScan注解要使用这个import tk.mybatis.spring.annotation.MapperScan,不要使用import org.mybatis.spring.annotation.MapperScan;
1.这样用:
@Autowired
private SysUserMapper sysUserMapper;
2.Mapper接口用@Mapper注解了吗?