Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support aws s3 Object Storage #79

Closed
WangJi92 opened this issue Oct 17, 2022 · 3 comments
Closed

Support aws s3 Object Storage #79

WangJi92 opened this issue Oct 17, 2022 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@WangJi92
Copy link
Owner

WangJi92 commented Oct 17, 2022

对象存储脚本支持aws s3 ,之前只支持 redis 、剪切板、 阿里云oss;aws s3 很多厂商都支持 比如minio、华为云、腾讯云等等

存储配置好了就可以使用脚本命令了 arhtas-idea-plugin Quickly Shell Script

@WangJi92
Copy link
Owner Author

WangJi92 commented Oct 17, 2022

本地安装一个 minio

mac 安装 brew install minio/stable/minio http://docs.minio.org.cn/minio/baremetal/tutorials/minio-installation.html

$ brew info minio
minio: stable 20210116021944 (bottled), HEAD
High Performance, Kubernetes Native Object Storage
https://min.io
/usr/local/Cellar/minio/RELEASE.2022-10-15T19-57-03Z_1 (3 files, 104.5MB) *
  Built from source on 2022-10-16 at 20:08:09
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/minio.rb
License: Apache-2.0
==> Dependencies
Build: go ✘
==> Options
--HEAD
	Install HEAD version
==> Caveats
To have launchd start minio now and restart at login:
  brew services start minio
Or, if you don't want/need a background service you can just run:
  minio server

brew services start minio 启动 user minioadmin p minioadmin
访问即可登录 http://127.0.0.1:9000

设置region

image

设置账号

image

创建bucket

image

配置存储

存储配置好了就可以使用脚本命令了 arhtas-idea-plugin Quickly Shell Script

image

@WangJi92 WangJi92 added the enhancement New feature or request label Oct 17, 2022
@WangJi92

This comment was marked as abuse.

@WangJi92
Copy link
Owner Author

WangJi92 commented Oct 18, 2022

https://youtrack.jetbrains.com/issue/BDIDE-1894/javalangIllegalArgumentException-awssdkconfigoverridejson-if-there-is-S3-connection-in-BDT-Panel

clear context classloader

  public static void checkBuckNameExist(String bucketName, AmazonS3 s3Client) {
        // 检查是否存在
        ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
        try {
            Thread.currentThread().setContextClassLoader(null);
            if (!s3Client.doesBucketExistV2(bucketName)) {
                throw new IllegalArgumentException("s3 bucketName not found");
            }
        } catch (Exception e) {
            LOG.info("checkBuckNameExist", e);
            throw new IllegalArgumentException("s3 bucketName not found" + e.getMessage());
        } finally {
            Thread.currentThread().setContextClassLoader(contextClassLoader);
        }
    }

image

@WangJi92 WangJi92 modified the milestones: shell-script-2.8, 2.39 Oct 19, 2022
@WangJi92 WangJi92 closed this as completed Apr 9, 2023
@WangJi92 WangJi92 added document documentation Improvements or additions to documentation and removed document labels Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant