I have a spring boot application with embedded Tomcat that I'm testing through Netbeans. Under the directory src/main/resources/ I have two folders which contain static files. I'm trying to use those files but the program seems to think the folders are empty.
Here is some code I wrote to test the directories and see whether or not they contain any files.
pathToFiles = "/resources/";
if(true)
{
File kmlDirectory = new File(pathToFiles + "waitingKML/");
Collection<File> files;
files = FileUtils.listFiles(
kmlDirectory,
new RegexFileFilter("^(.*?)"),
DirectoryFileFilter.DIRECTORY
);
if(files.isEmpty()) {
return "Files are empty: " + kmlDirectory.toString();
}
else
return "Files are NOT empty";
}
And here is a picture of my directory structure (viewed from Netbeans).

When I run this test code I get 'Files are empty: \resources\waitingKML'.

According to documentation found here, https://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot, Spring Boot will automatically add static web resources located within any of the following directories:
- /META-INF/resources/
- /resources/
- /static/
- /public/
I'm wondering if this has to do with any property files or my configuration/setup?