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
Finally got the answer myself...
@Value("#{T(org.apache.commons.io.FileUtils).readFileToString(" + "T(org.springframework.util.ResourceUtils).getFile('classpath:myquery.sql')" + ")}") String sql;
sql is now default filled by the exact content of myquery.sql under classpath