cn.jadenziv.source:qcloud-image-sdk-spring-boot-starter


License

License

Categories

Categories

Spring Boot Container Microservices JADE General Purpose Libraries Utility
GroupId

GroupId

cn.jadenziv.source
ArtifactId

ArtifactId

qcloud-image-sdk-spring-boot-starter
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Source Code Management

Source Code Management

https://github.com/JadenZiv/qcloud-image-sdk-spring-boot-starter.git

Download qcloud-image-sdk-spring-boot-starter

How to add to project

<!-- https://jarcasting.com/artifacts/cn.jadenziv.source/qcloud-image-sdk-spring-boot-starter/ -->
<dependency>
    <groupId>cn.jadenziv.source</groupId>
    <artifactId>qcloud-image-sdk-spring-boot-starter</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/cn.jadenziv.source/qcloud-image-sdk-spring-boot-starter/
implementation 'cn.jadenziv.source:qcloud-image-sdk-spring-boot-starter:1.0.0'
// https://jarcasting.com/artifacts/cn.jadenziv.source/qcloud-image-sdk-spring-boot-starter/
implementation ("cn.jadenziv.source:qcloud-image-sdk-spring-boot-starter:1.0.0")
'cn.jadenziv.source:qcloud-image-sdk-spring-boot-starter:jar:1.0.0'
<dependency org="cn.jadenziv.source" name="qcloud-image-sdk-spring-boot-starter" rev="1.0.0">
  <artifact name="qcloud-image-sdk-spring-boot-starter" type="jar" />
</dependency>
@Grapes(
@Grab(group='cn.jadenziv.source', module='qcloud-image-sdk-spring-boot-starter', version='1.0.0')
)
libraryDependencies += "cn.jadenziv.source" % "qcloud-image-sdk-spring-boot-starter" % "1.0.0"
[cn.jadenziv.source/qcloud-image-sdk-spring-boot-starter "1.0.0"]

Dependencies

compile (6)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter jar
org.springframework.boot : spring-boot-starter-json jar
org.springframework.boot : spring-boot-configuration-processor Optional jar
org.projectlombok : lombok Optional jar
com.squareup.okhttp : okhttp jar 2.7.5
commons-codec : commons-codec jar

Project Modules

There are no modules declared in this project.

腾讯(智能图像服务)qcloud-image-sdk的spring-boot-starter

官方的源代码

  1. 查看腾讯sdk 源代码
  2. 官方源代码有比较详细的入门 demo

集成该项目

使用maven

<dependency>
   <groupId>cn.jadenziv.source</groupId>
   <artifactId>qcloud-image-sdk-spring-boot-starter</artifactId>
   <version>1.0.0</version>
 </dependency>

使用方法

1.在application.yml简单配置

qcloud:
  image:
    secret-id: xxx
    app-id: xxx
    secret-key: xxx

2.注入ImageService就可以使用

@Autowired
private ImageService imageService;

3.默认是不开启代理的,需要在yml里配置开启

qcloud:
  image:
    secret-id: xxx
    app-id: xxx
    secret-key: xxx
    is-enable-proxy: true
    ip: xxxx
    host: 8080
    type: http

4.如果要使用官方sdk的服务,注意官方的返回的是一个json字符串,需要自己解析

@Autowired
private Image image;

注意事项

  1. 该项目是跟springboot整合的,所以必须在springboot的环境下才可以使用
  2. org.json的json解析包换成jackson
  3. 把官方sdk返回的字符串封装成对象,开发者在进行调用时不用自行封装

官方的bug

  1. 解决官方sdk导入到springboot项目会报错的bug,该bug是因为和springboot下json包冲突了,官方在其他sdk上有给出解决方案
  2. 解决官方sdk用byte[] 时报错的bug ,腾讯至今还没有回复该bug

Versions

Version
1.0.0