ReloadableResourceBundleMessageSource - find properties file

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ReloadableResourceBundleMessageSource - find properties file

jphiloon
I created a groovy utility class that exposes a few methods into ReloadableResourceBundleMessageSource .  The utility class has static properties (static ReloadableResourceBundleMessageSource set in a static constructor) and static methods.

I cannot reliably load my 'app.properties' file.  If I set the basename to 'app' and put the property file in the root of the application then I can access it in run-app but not in a tomcat war deployment.  If I set the basename to 'WEB-INF/app' (with the property file in that location) I can never access it.

Is the static nature of the utility class interfering with finding the properties file?  Do I have to create a spring bean for this?  Where should I put the app.properties file really?  (It's just some simple information about the application - no message arguments - I always use resolveCodeWithoutArguments to return values.
Reply | Threaded
Open this post in threaded view
|

Re: ReloadableResourceBundleMessageSource - find properties file

jphiloon
Ok, I defined a spring bean (into which the resource loader gets injected) and everything works fine.