Referencing Map Elements in SpEL - Spring FTP dynamic remote directory creation -


i'm using outbound-channel-adapter of spring integration ftp

<int-ftp:outbound-channel-adapter id="ftpoutadapterautocreate" session-factory="ftpsessionfactory" channel="outchannel" remote-directory-expression="headers.['remotedir']" charset="utf-8" /> 

in java code i'm setting remote directory in header.

org.springframework.integration.message<file> messagea= org.springframework.integration.support.messagebuilder .withpayload(reqfile).setheader("remotedir",  "/errororders").build(); 

error message showing while deploying

org.springframework.expression.spel.spelparseexception: el1049e:(pos 7):  unexpected data after '.': 'lsquare([)' 

there's no period when referencing element of map (message headers map). syntax headers['remotedir'] (no dot before [).

also, given map key has no .s in it, can use headers.remotedir.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -