From a7aaeabc7873a0eafb4a7ecad7f65b018b7a9bc9 Mon Sep 17 00:00:00 2001
From: sean.zhou <sean.zhou@dji.com>
Date: Fri, 24 Feb 2023 19:31:23 +0800
Subject: [PATCH] What's new? 1. Add license for dock. 2. Modify the logic corresponding to the firmware file and device type. 3. Add multiple mqtt clients options. 4. Modify the structure of the interface for obtaining the device list. 5. Fixed some issues.
---
src/main/resources/application.yml | 118 ++++++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 80 insertions(+), 38 deletions(-)
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 8c95358..75c4872 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -7,7 +7,7 @@
druid:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://localhost:3306/cloud_sample?useSSL=false&allowPublicKeyRetrieval=true
+ url: jdbc:mysql://cloud_api_sample_mysql:3306/cloud_sample?useSSL=false&allowPublicKeyRetrieval=true
username: root
password: root
initial-size: 10
@@ -15,12 +15,22 @@
max-active: 20
max-wait: 60000
- jackson:
- property-naming-strategy: SNAKE_CASE
- date-format: yyyy-MM-dd HH:mm:ss
- default-property-inclusion: NON_NULL
- deserialization:
- FAIL_ON_UNKNOWN_PROPERTIES: false
+ redis:
+ host: cloud_api_sample_redis
+ port: 6379
+ database: 0
+ username: # if you enable
+ password:
+ lettuce:
+ pool:
+ max-active: 8
+ max-idle: 8
+ min-idle: 0
+
+ servlet:
+ multipart:
+ max-file-size: 2GB
+ max-request-size: 2GB
jwt:
issuer: DJI
@@ -29,14 +39,19 @@
age: 86400
mqtt:
- protocol: tcp
- host: Please enter the address of the emqx server. # Example: 192.168.1.1
- port: 1883
- username: JavaServer
- password: 123456
- client-id: 123456
- # Topics that need to be subscribed when initially connecting to mqtt, multiple topics are divided by ",".
- inbound-topic: sys/product/+/status
+ # @see com.dji.sample.component.mqtt.model.MqttUseEnum
+ # BASIC parameters are required.
+ BASIC:
+ protocol: MQTT # @see com.dji.sample.component.mqtt.model.MqttProtocolEnum
+ host: Please enter your ip.
+ port: 1883
+ username: JavaServer
+ password: 123456
+ client-id: 123456
+ # If the protocol is ws/wss, this value is required.
+ path:
+ # Topics that need to be subscribed when initially connecting to mqtt, multiple topics are divided by ",".
+ inbound-topic: sys/product/+/status,thing/product/+/requests
url:
manage:
@@ -54,34 +69,61 @@
storage:
prefix: /storage
version: /api/v1
+ control:
+ prefix: /control
+ version: /api/v1
-# Tutorial: https://help.aliyun.com/document_detail/100624.htm?spm=a2c4g.11186623.0.0.74075e34eIhK7T#concept-xzh-nzk-2gb
-aliyun:
- oss:
- enable: false
- endpoint: Please enter your endpoint. # Example: https://oss-cn-shenzhen.aliyuncs.com
- access-key: Please enter your access key.
- secret-key: Please enter your secret key.
- expire: 3600
- region: Please enter oss region. # Example: cn-shenzhen
- role-session-name: Please enter session name. # A custom role session name to distinguish the different tokens, for example it could be filled in as SessionTest.
- role-arn: Please enter role ARN. # Example: acs:ram::123456789:role/oss
- bucket: Please enter bucket name.
- object-dir-prefix: Please enter object prefix.
-
-# MinIO is temporarily unavailable.
-minio:
- enable: false
- endpoint: Please enter your endpoint. #http://192.168.1.1:9000/
- access-key: minioadmin
- secret-key: minioadmin
- bucket: Please enter bucket name.
+# Tutorial: https://www.alibabacloud.com/help/en/object-storage-service/latest/use-a-temporary-credential-provided-by-sts-to-access-oss
+oss:
+ enable: true
+ provider: ali # @see com.dji.sample.component.OssConfiguration.model.enums.OssTypeEnum
+ endpoint: https://oss-cn-hangzhou.aliyuncs.com
+ access-key: Please enter your access key.
+ secret-key: Please enter your secret key.
expire: 3600
- region: Please enter minio region.
- object-dir-prefix: Please enter object prefix.
+ region: Please enter your oss region. # cn-hangzhou
+ role-session-name: cloudApi
+ role-arn: Please enter your role arn. # acs:ram::123456789:role/stsrole
+ bucket: Please enter your bucket name.
+ object-dir-prefix: Please enter a folder name.
+
+#oss:
+# enable: true
+# provider: aws
+# endpoint: https://s3.us-east-1.amazonaws.com
+# access-key:
+# secret-key:
+# expire: 3600
+# region: us-east-1
+# role-session-name: cloudApi
+# role-arn:
+# bucket: cloudapi-bucket
+# object-dir-prefix: wayline
+
+#oss:
+# enable: true
+# provider: minio
+# endpoint: http://192.168.1.1:9000
+# access-key: minioadmin
+# secret-key: minioadmin
+# bucket: cloud-bucket
+# expire: 3600
+# region: us-east-1
+# object-dir-prefix: wayline
logging:
level:
com.dji.sample: debug
file:
name: logs/cloud-api-sample.log
+
+ntp:
+ server:
+ host: Google.mzr.me
+
+# To create a license for an application: https://developer.dji.com/user/apps/#all
+cloud-api:
+ app:
+ id: Please enter the app id.
+ key: Please enter the app key.
+ license: Please enter the app license.
\ No newline at end of file
--
Gitblit v1.9.3