However, the code relies on an IOException but in the case of S3 the returned SimpleStorageResource.getFile() throws UnsupportedOperationException
try {
Resourcepath = getResourceLoader().getResource(templateLoaderPath);
Filefile = path.getFile(); // will fail if not resolvable in the file system
...
} catch (IOExceptionex) {
returnnewSpringTemplateLoader(getResourceLoader(), templateLoaderPath);
}
So I believe the catch just need to be converted to a multicatch to handle both.
I see that if I set ```
spring.freemarker.prefer-file-system-access=false
Affects: 4.3.7
The text was updated successfully, but these errors were encountered:
We can easily catch all exceptions there since we're logging them anyway and can always try to fall back to our general template loader. This is in master now; I'll backport this to 4.3.8 tomorrow.
Brad Giaccio opened SPR-15445 and commented
The default config uses classpath:/templates/ which eventually gets processed by FreeMarkerConfigurationFactory.getTemplateLoaderForPath
I've set
However, the code relies on an IOException but in the case of S3 the returned SimpleStorageResource.getFile() throws UnsupportedOperationException
So I believe the catch just need to be converted to a multicatch to handle both.
I see that if I set ```
spring.freemarker.prefer-file-system-access=false
Affects: 4.3.7
The text was updated successfully, but these errors were encountered: