'Spring, Why does the controller work 3 times?

I finished the initial setup using a combination of Spring Framework + Maven.

No special work was done and only minimal installation was performed.

It consists of one most basic controller and one JSP (basic index) file.

So when I run the server, the System.out.println statement I wrote down as an example in the controller is executed a total of 3 times.

Why is that?

@Controller
public class mainController {

@RequestMapping(value="/")
public String main() {

    System.out.println("why?");
    return "index";
   }
}

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source