FileBackedHTTPResource - Spring

Cantor, Scott cantor.2 at
Tue Jun 16 19:25:27 UTC 2020

On 6/16/20, 3:14 PM, "users on behalf of Joshua Brodie" <users-bounces at on behalf of josbrodie at> wrote:

> My level of Spring comprehension is low -- how do I invoke 'fileResource1' and 'fileResource2' to load the files? Is the
> configuration below somewhat sane?

I really wouldn't do this (there's no security for starters), but if you're trying to use remote resources for a service, you need to put the resource beans inside the list of service resources as the list values, you don't just reference the backup file from the list as though it were a local file. I doubt it would even work, because nothing will probably ever fetch the file and create the backup.

Do NOT use a file caching HttpClient. That doesn't do what you think it does and adds nothing when combined with the file-backed resource class. The resource class does all the work needed.

-- Scott

More information about the users mailing list