spring-projects / spring-webflow

Spring Web Flow
https://spring.io/projects/spring-webflow
Apache License 2.0
328 stars 232 forks source link

Support for Spring property replacement in webflow-config schema parser [SWF-1681] #858

Open spring-operator opened 8 years ago

spring-operator commented 8 years ago

Scott Cantor opened SWF-1681 and commented

There is some support for Spring property replacement in the custom Spring XML parser that implements the webflow-config schema. For example, the webflow:flow-registry element passes through a BeanDefinitionBuilder, so Spring handles replacement of properties such as the base-path attribute.

It would be really useful to have that capability in the \ elements since that would allow outside injection of the paths to use for flows, but those elements are directly turned into FlowLocation objects, so there's no opportunity for Spring to handle the property replacement.

I can work on a patch for this if it would be considered for inclusion, it's just a matter of indirecting things through BeanDefinitionBuilders to give Spring a chance to do its work.


Affects: 2.4.2

Attachments:

spring-operator commented 8 years ago

Rossen Stoyanchev commented

Yes a patch would be appreciated, thanks.

spring-operator commented 8 years ago

Scott Cantor commented

Ok, will do, thank you.

spring-operator commented 8 years ago

Scott Cantor commented

Patch attached that indirects all the object construction in that Spring parser. I tested the two cases we use, flow-location and flow-location-pattern, and properties work for both.