restTemplate cannot be resolved or is not a field

this.restTemplate = restTemplate; is giving error (restTemplate cannot be resolved or is not a field)in the constructor of PortfolioManagerImpl

Declare a global variable for the same.

You need to add it as a variable to class PortfolioManagerImpl, by declaring RestTemplate restTemplate above the constructor.

Let me know if this helps!

You need to declare restTemplate as instance variable of class. Above the constructor inside constructor you will see an error where you are assigning value to this.restTemplate click above this you will find Quick Fix option just use it.
Ref. For variable types are
https://www.tutorialspoint.com/What-are-class-variables-instance-variables-and-local-variables-in-Java

Make sure there is a member variable name restTemplate in the class specifed and also make sure that you have provided an access modifer to that variable i.e public or private or projected. I prefer member varaiables to be declared as private

@ravi I’m closing this topic because we didn’t get any response for 12 hours from you. If your issue is still not resolved, create a new topic and share this topic’s link on that new topic we will continue the discussion on the new topic.