I am working on an existing code that is using one controller to call a method on the 2nd controller. There are 2 implementations I have seen so far.
1st Implementation
return new Controller().method(request, response);
2nd Implementation
@Autowired
private Controller controller.
return this.controller.method(request, response);
Which is the right implementation, what are the problems if any with either of them.