Hi What is the @deprecation?
On Wed, Apr 22, 2009 at 2:56 PM, Willem Jiang <[email protected]> wrote: > Hi > > You could use constant for this, just like this > from("direct:start"). > setHeader("foo", constant("ABC")). > to("mock:result"); > > Willem > > G.J. van de Streek wrote: >> Is there a way to use string constants in the simple expression language. I >> am trying to fix a deprecation warning in: >> >> from("direct:saveAgentsFile") >> .setHeader(FileComponent.HEADER_FILE_NAME, "agents.xml") >> >> .to("file:///Users/streekgj/Desktop/filestore/?append=false") >> ; >> >> I tried to change it to: >> >> .setHeader(FileComponent.HEADER_FILE_NAME, new >> SimpleExpression("agents.xml");) >> >> Of course it is treated as an expression, but is there any way to mark it as >> an string literal, or escape the dot? Something like: >> >> .setHeader(FileComponent.HEADER_FILE_NAME, new >> SimpleExpression("'agents.xml'");) >> or >> .setHeader(FileComponent.HEADER_FILE_NAME, new >> SimpleExpression("agents\\.xml");) >> >> Or do string literals only works with operations? > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus Apache Camel Reference Card: http://refcardz.dzone.com/refcardz/enterprise-integration
