I need to specify String constant as value of attribute:
<int:header name="importedFilename" />
here “importedFilename” should not be hardcoded but taken from f.e. from Constants.IMPORTED_FILENAME_HEADER static field. Is there a way to do it? “int” is Spring Integration namespace btw. Also it seems that there is no appropriate bean definition to replace int:header with – so I can’t use <bean class="Header">....
You should then be able to reference this by its id (
importedFilenameHeader) to be used in your<int:header>element like so:EDIT:
You should be able to do this using SpEL. It is Spring’s Expression Language, and it is available in 3.0 (maybe 2.5 also?).
I think you can go about doing this then:
Spring should then evaluate this to be the value of the Constant
importedFilenameHeaderthat we defined in the original part (which is also included in this example).Here is some location information for getting the
utilnamespace: