Spring boot alternate src/main/resource directory on classpath

911 views Asked by At

This post is not about serving static resources in Spring Boot. There are other posts that cover that nicely. I think I have a grasp now of the different /public /static directory options, whether located underneath src/main/resources or not. What I want to know is whether I can specify an additional directory in my project whose contents will also be placed at the root of the classpath (as opposed to the web document root).

Specifically, I am referring to my translated resource bundles (e.g., index.properties, index_fr.properties, index_de.properties, etc.). In my pre-Spring Boot projects I have a "bundles" directory designated for all my translated property files. I would prefer to continue using a bundles directory for my translated strings and not have to place them in my src/main/resources directory with the main application property files.

0

There are 0 answers