I have a spring boot project that is deployed on Tomcat 6. I have a list of files under project's resource directory and I am trying to list all files under that directory. I am able to get specific file if I specify classpath:abc.txt in the getResource() method. However I am wondering if there is a way to just list all files with a wild card or something.
You cannot do like this MyClass.class.getResource('*.txt'). The alternative to this is :
Refer this :Using File.listFiles with FileNameExtensionFilter