I tried to run spring boot application, that will return me the HTML static file on the static folder, the problem was: every time I load the page: 127.0.0.1 I get the String \"
I had this same problem. There was no way to return an html just by returning a String with the name of the html file. For me, it only worked using ModelAndView, in your case it would look like this:
@RequestMapping("/")
public ModelAndView welcome() {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("bakara");
return modelAndView;
}
Some people say that problems like this occurs because the jdk version. I use jdk14.