In the main class, after the configuration "@SpringBootApplication", adding "@ComponentScan" without having any arguments, worked for me !!!
Main Class :
@SpringBootApplication
@ComponentScan
public class CommentStoreApplication {
public static void main(String[] args) {
SpringApplication.run(CommentStoreApplication.class, args);
}
}
RestController Class :
@RestController
public class CommentStoreApp {
@RequestMapping("/")
public String hello() {
return "Hello World!";
}
}
P.S: Don't miss to run mvn clean and mvn install commands, before launching the application