0

Is there a way I can access spring property placheolder directly inside groovy script file used in a mule Flow

Would something like this work? . Assuming that 'ftp.server.url' is a property in application.properties loaded by spring

<context:property-placeholder location="classpath:application.properties" />

Ex Groovy script:

def ftpClient =new FTPClient().with {
    connect ${ftp.server.url}
}
Joe Scaria
  • 125
  • 1
  • 9

1 Answers1

2

If your script is embedded in the Mule XML config, this should work:

def ftpClient =new FTPClient().with {
    connect "${ftp.server.url}"
}
David Dossot
  • 33,403
  • 4
  • 38
  • 72