Error: cannot find symbol

this.restTemplate = restTemplate;
Shows cannot find symbol restTemplate

Make sure you have declared member varaible restTemplate in your class

@yakshit is right, please follow that instruction.