I read the following documentation from spring.io and it said By default Spring Boot will serve static content from a directory called /static (or /public or /resource
@RestController
public class IndexController {
@RequestMapping("/")
public String index(){
System.out.println("Looking in the index controller.........");
return "index";
}
}
Problem is here, you are using @RestController, so in this case, if you write "return 'index';" spring boot covers it as just string answer. You need use @Controller annotation instead.