Skip to content

Instantly share code, notes, and snippets.

@mcantrell
Created July 12, 2013 13:26
Show Gist options
  • Save mcantrell/5984442 to your computer and use it in GitHub Desktop.
Save mcantrell/5984442 to your computer and use it in GitHub Desktop.
Spring string from a text file
<bean id="userByUserNameQuery" class="org.apache.commons.io.IOUtils" factory-method="toString">
<constructor-arg type="java.io.InputStream">
<bean class="java.io.FileInputStream" destroy-method="close">
<constructor-arg type="java.io.File" value="classpath:/jdbc/userByName.sql"/>
</bean>
</constructor-arg>
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment