Using NetBeans 8.1.
I have this simple java Spring Boot project without any beans or persistency. Two java classes in the same package.
@SpringBootApplication
public class SpringSimpleTestApplication {
public static void main(String[] args) {
SpringApplication.run(SpringSimpleTestApplication.class, args);
}
}
@Controller
public class WebController {
@RequestMapping("/")
public String index(){
return "index";
}
}
And a "index.html" file under src/main/resources->templates
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<h1>Test</h1>
</body>
</html>
When i run it i have no errors but when i go to http://localhost:8080/ I have the Whitelabel Error Page :
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu Feb 09 01:53:26 CET 2017
There was an unexpected error (type=Not Found, status=404).
No message available