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
Post a Comment