I am using Spring boot application. I have this structure in my resource folder
resources
|__customers
|__retail
I have to pass the path to this folder to one of the beans for writing files. The names of the files are dynamic so I cannot pass a predefined value to the file.
To do this I tried
@value(${classpath:resources/customer/retail} )
Resources resource;
// Also tried
ResourceLoader loader = new FileSystemResourceLoader();
ResourceUtils.getURL(filePathDump).getPath().getClass().getResource(
"indexingData/publication/analysis/dump"
);
// and several other options
but it shows throw file not found or resource not found Exception, Now I checked the way path are defined for each one of them and I am positive they were all specified correctly
I need a way to pass this path to a folder in resources. Please help