为什么报错
public interface UserService {
User getUser();
}
public class UserServiceImpl implements UserService {
@Resource
private UserMapper userMapper;
public User getUser(){
return userMapper.getUser();
}
}
@Mapper
public interface UserMapper {
User getUser();
}
public static void main(String[] args) {
SpringApplication.run(SkyApplication.class, args);
UserService userService=new UserServiceImpl();
System.out.println(userService.getUser());
log.info("server started");
}
报错信息: