r/javahelp • u/INFLATABLE_CUCUMBER • Sep 03 '20
Any simple github projects that combine Spring Webflux for Java's backend, and HTML + JS for frontend?
Hi, I found something a while ago that did this: https://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot
https://github.com/ericbv/staticContentWithSpringBoot/tree/master/src/main/resources.
Problem that I couldn't understand with it was that inside of the controller, it said:
@RequestMapping("/offerView")
public String page(){
return "html/offer";
}I couldn't make sense of this path "html/offer", and I'd tried to replicate this relatively simple concept and put it into a WebFlux app, but I couldn't get the thing to work. I'm still searching, but looking for some sort of github project, or example for how to do this linkage, and coming up short. Anyone got any ideas? Thanks
20
Upvotes
2
u/daru567 Sep 04 '20
I've downloaded and loaded the github project in the link you posted above. Started it up, went to http://localhost:8080/offerView and the page loads just fine. So it seems that isn't your own project? Do you have your project loaded onto a source repository for easy access? It's difficult to know what you have done.