0

when I want to call the method of my Spring FeignClient I get a NullPointerException:

FeignClient

@FeignClient(url="http://localhost:8080", name="feignClient")
public interface CallFeignClient {

    @RequestMapping(path = "/start")
    public String start();

}

Service Class

@Service
public class Call {

    @Autowired
    private CallFeignClient callFeignClient ;

    public Call() {

    }

    public void call() {
        callFeignClient.start();
    }
} 
Hans95
  • 25
  • 6
  • I think it would be beneficial to post the stack trace of your exception as well. – Endzeit Jun 09 '22 at 16:49
  • Also show the place, where you use the `Call` class (do you maybe instantiate that class with the new parameter?) – dunni Jun 09 '22 at 16:56

0 Answers0