Tenho (1) a seguinte SpringBootApp:
@SpringBootApplication
public class ListaVipApplication {
public static void main(String[] args) {
SpringApplication.run(ListaVipApplication.class, args);
}
}
(2) o seguinte controlador:
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class StaticSitePagesController {
@RequestMapping("/home")
public String index() {
return "home";
}
}
E (3) a página HTML, nome do arquivo home.html, criado no path: src/main/resources/templates/home.html.
Porque quando a aplicação sobre e eu digito a URL "http://localhost:8080/home" recebo o seguinte erro:
Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Mon Apr 13 18:05:27 BRT 2020 There was an unexpected error (type=Not Found, status=404). No message available