Okay, I’m confused here.
I have a properties file with some SQL scripts that I want to store at startup (using Spring MVC servlet container in Tomcat) for later use. Well I think I have the syntax for that down in the *-servlet.xml:
<util:properties
id="findQueries"
location="classpath:resources/FindQueries.properties" />
but I’m not sure how to access it programmatically. I really only need one query from this file in one function of a service-layer class at this point.
I’m fairly new to Spring in general, so I’m definitely not set in my ways. Any suggestions of how to do this better / different will be considered.
Thanks all!
Obviously there is more than a dozen ways of doing this, Easiest way of doing this using @Value autowiring..
One other way of doing is to autowire the properties and then lookup for the key…