Is there an easy way to configure a Flow to read a single file from the classpath one time? I don\'t need to poll for a file. I just need to read a known file and set its co
For some reason I cannot make the solution proposed by David Dossot to work. I was inspired by this answer and came up with another solution
and then you can use set-payload in the following way
which will result in setting the payload with the content of the file as a String.
This method has the advantage that the content of the resource file is loaded only once into a bean of type String. So if your set-payload statement is executed frequently, this could improve performance.