首页 > 解决方案 > 内存中的对象图序列化

问题描述

假设我将这个对象实例化为示例:

    BasicAWSCredentials credentials =
            new BasicAWSCredentials(objectStoreAccessKey, objectStoreSecretKey);
    AmazonS3 s3client = AmazonS3ClientBuilder
            .standard()
            .withCredentials(new AWSStaticCredentialsProvider(credentials))
            .withEndpointConfiguration(
                    new AwsClientBuilder.EndpointConfiguration(objectStoreEndpoint, objectStoreRegion))
            .build();

AmazonS3本身(和其他类似的客户端)是不可序列化的,有没有办法将其完整的对象图序列化,因为它可以在应用程序和/或其他进程的不同实例中使用。

标签: java

解决方案


推荐阅读