明天_你好a_个人页

个人头像照片 明天_你好a
个人头像照片
0
2
0

个人介绍

暂无个人介绍

擅长的技术

  • Java
  • Go
  • 容器
  • 微服务
  • Linux
  • 数据库
获得更多能力
通用技术能力:

暂时未有相关通用技术能力~

云产品技术能力:

暂时未有相关云产品技术能力~

阿里云技能认证

详细说明
暂无更多信息

2022年09月

2022年01月

正在加载, 请稍后...
暂无更多信息
  • 回答了问题 2022-09-08

    OSS base64图片上传

    base64格式:data:image/png;base64, 注意","符号。

    
        public static void main(String[] args) {
            // base64文件
            String base64ByCode = Objects.requireNonNull(getHeadPhotoBase64ByCode("1")).replace(base64_pre, "");
            // 填写Object完整路径,完整路径中不能包含Bucket名称,例如exampledir/exampleobject.txt。
            String objectName = "images/2.png";
            // 创建OSSClient实例。
            OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
            try {
                // 填写Byte数组。
                byte[] content = new BASE64Decoder().decodeBuffer(base64ByCode);
                // 创建PutObject请求。
                ossClient.putObject(bucketName, objectName, new ByteArrayInputStream(content));
            } catch (OSSException oe) {
                System.out.println("Caught an OSSException, which means your request made it to OSS, "
                        + "but was rejected with an error response for some reason.");
                System.out.println("Error Message:" + oe.getErrorMessage());
                System.out.println("Error Code:" + oe.getErrorCode());
                System.out.println("Request ID:" + oe.getRequestId());
                System.out.println("Host ID:" + oe.getHostId());
            } catch (ClientException ce) {
                System.out.println("Caught an ClientException, which means the client encountered "
                        + "a serious internal problem while trying to communicate with OSS, "
                        + "such as not being able to access the network.");
                System.out.println("Error Message:" + ce.getMessage());
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                if (ossClient != null) {
                    ossClient.shutdown();
                }
            }
        }
    
    踩0 评论0
  • 回答了问题 2022-01-14

    nacos 同namespace下不同分组之间的服务调用问题

    我也遇到了同样的问题,那你目前是怎么做的?所有的服务注册都放在同一个组下面吗?

    踩0 评论0
正在加载, 请稍后...
滑动查看更多
正在加载, 请稍后...
暂无更多信息