spring-webflow
spring-webflow copied to clipboard
SpringBoot, Spring WebFlow, Spring Faces and the Classpath [SWF-1745]
Danilo opened SWF-1745 and commented
Hello,
we're trying to bring a legacy WAR application (once deployed on an ordinary Application Server) over to Spring Boot (as a JAR).
The application uses WebFlow and Faces, among other stuff; and it uses JSF as the templating technology. Configuring the all of this as shown in the WebFlowConfiguration.java attachment and positioning the other two attachments over into src/main/resources/flows/view just doesn't work.
What happens is that the flow is 100% reachable on the address:
http://localhost:8080/context-path/mvc-servlet-path/view
Affects: 2.5.1
Attachments:
- view.xhtml (135 bytes)
- view-flow.xml (348 bytes)
- WebFlowConfiguration.java (3.16 kB)
Danilo commented
Sorry, I inadvertedly submitted the issue without even completing it and cannot find how to edit it. :( I'll continue here:
The problem is that the flow is reachable, but when it tries to load the xhtml, the FlowViewHandler Spring class trips upon this:
throw new IllegalStateException("A ContextResource is required to get relative view paths within this context; the resource was " + viewResource);
so it looks like that Spring Faces just cannot load templates from the classpath. Is this correct? What is the correct way to expose flows and templates on a SpringBoot/WebFlow/Faces application?
Rossen Stoyanchev commented
It would really help if you could provide a minimal sample rather than snippets of configuration.