public class S3ProtocolResolver
extends java.lang.Object
implements org.springframework.core.io.ProtocolResolver
ProtocolResolver
interface. When an instance of this class is added to a
Spring Application context list of Protocol Resolvers via
ConfigurableApplicationContext.addProtocolResolver(ProtocolResolver)
allows
valid S3 resources to be loaded using the Spring ResourceLoader
abstraction.
Leverages some work done by Spring Cloud AWS.
Constructor and Description |
---|
S3ProtocolResolver(S3ClientFactory s3ClientFactory,
org.springframework.core.task.TaskExecutor s3TaskExecutor)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.springframework.core.io.Resource |
resolve(java.lang.String location,
org.springframework.core.io.ResourceLoader resourceLoader) |
public S3ProtocolResolver(S3ClientFactory s3ClientFactory, org.springframework.core.task.TaskExecutor s3TaskExecutor)
s3ClientFactory
- The S3 client factory to use to get S3 client instancess3TaskExecutor
- A task executor to use for uploading files to S3