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
1
u/INFLATABLE_CUCUMBER Sep 03 '20
So here's what I've done so far, in terms of getting an identical setup. I've used MVCs before in the .NET framework, so I know the basics of full stack development.
Basically, I copied the "resources" folder in correctly. Then, sort of related to what you said, I added:
Into my .classpath file. Then I added
into my .settings/org.eclipse.core.resources.prefs file. This still got
as an error: "Could not resolve view with name 'html/offer'."