I have a Spring MVC project (created using maven), and I spent the whole day looking for a way to use the properties file outside the directory WEB-INF.
For example, I tried putting it in a resource directory, but this does not work at all.
If I put the properties file in a directory src/main/resources, then compiling the project places this file in the directory target/{project name}/WEB-INF/classesso that the org.springframework.context.support.ReloadableResourceBundleMessageSourcebean cannot read it.
If I put the properties file in a directory WEB-INF, then the file will be copied to the directory target/{project name}/WEB-INFand the ReloadableResourceBundleMessageSourcebean will be able to read it.
Is it possible to use a properties file when I put it outside the directory WEB-INF, for example, inside the resource directory?
source
share