I'm following the Spring tutorial on the JetBrains website and when I try to build and run after adding the sayHello() method, it tells me it cannot find symbol RequestParam and GetMapping:
@GetMapping("/hello")
public String sayHello(@RequestParam(value = "myName", defaultValue = "World") String name) {
return String.format("Hello %s!", name);
}
Error message:
Error:(14, 29) java: cannot find symbol
symbol: class RequestParam
location: class com.example.demo.DemoApplication
Error:(13, 6) java: cannot find symbol
symbol: class GetMapping
location: class com.example.demo.DemoApplication