Answer the question
In order to leave comments, you need to log in
Why can't Spring Boot see html?
Downloaded from https://start.spring.io/ project from Web, JPA. I deploy on my computer. Next, I throw the index.html file into the src/main/resources/static folder. I start the project - the page is displayed. Now, I am adding a controller
package ru.nevars.bunny.web.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
@Controller
@RequestMapping(value = "/page-login")
public class LoginController {
@RequestMapping(value = "/", method = RequestMethod.GET)
public ModelAndView loadLoginPage() {
return new ModelAndView("page-login");
}
}
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Sat Nov 12 11:38:15 MSK 2016
There was an unexpected error (type=Not Found, status=404).
no message available
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question