I'm using spring boot 1.3.3 and what I have is mainly a REST api project, I want to serve some html pages on this application and I've been having troubles the whole day trying to configure it up.
I was able to serve static pages but it looks like Velocity is resolving the views because its view resolver has priority. So I had to change velocitys view resolver suffix from vm to html (or else ill have to change the extension of my html pages), like so, spring.velocity.suffix=.html
in application.properties
This is how I managed to serve forgot_password.html that resides in /resources/
@Controller
@RequestMapping(value = "/")
public class SiteController {
@RequestMapping(value = "forgot_pass", method = RequestMethod.GET)
public String forgotPassword() {
return "forgot_password";
}
}
If i remove velocity from my project, I can't host static html pages (I don't know why, probably an obvious reason but i'm a bit ignorant on this) but looks like spring tries to point to an api end-point, while i'm actually trying to point to a resource file.
Is there a way to serve static html pages without using @EnableWebMvc
or any templating technology (like velocity/thyemleaf)?
Thanks
edit: pom dependencies