Using a Spring Boot web application I trying to serve my static resource from a file system folder outside my project.
Folder structure looks like:-
Spring Boot Maven Plugin can add extra directories to the classpath. In your case you could include that in your pom.
org.springframework.boot
spring-boot-maven-plugin
${spring.boot.version}
${project.build.directory}/../ext-resources
...
So that way you don't need inlcude any hard-code in your classes. Simply start your webapp with
mvn spring-boot:run