Given the @Controller
below, even if i send a Get Request to the webApp, the controller run the homePage method.
@RestController
@RequestMapping(method = RequestMethod.POST)
public class MyController {
@GetMapping("/hello")
public String homePage() {
return "Hello, It is my first application";
}
}
How could that happen? Normally, i restrict that from the class level.