How to use spring expression to read file content and put it into a string?
I would like to do the following.
For example,
@Value("classpath:myquery.sql")
File f;
@Value("#{org.apache.commons.io.FileUtils.readFileToString(f)}")
String sql;
Or even better
@Value("#{FileUtils.readFileToString(classpath:myquery.sql)}")
String sql;
However, none of above code work.
Just to mention I am using spring version 3.2.0
Thanks.