Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
java-demo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
java-demo
Commits
cbfb9bfc
Commit
cbfb9bfc
authored
May 28, 2019
by
杜祥龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add readme
Signed-off-by: sdvdxl杜龙少 <sdvdxl@163.com>
parent
7a4f80b4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
README.md
+8
-0
src/main/java/me/hekr/demo/GatewayDevice.java
+3
-3
No files found.
README.md
0 → 100644
View file @
cbfb9bfc
# 说明
本项目使用 maven 进行管理。
如果想要基于本程序进行测试,需要在
`GatewayDevice`
类main函数开始处设置
`DEV_TID`
`PRIV_KEY`
`PROD_KEY`
替换掉,然后再运行 main函数。
暂时只提供 网关 登录和心跳示例。
\ No newline at end of file
src/main/java/me/hekr/demo/GatewayDevice.java
View file @
cbfb9bfc
...
@@ -15,11 +15,11 @@ import java.util.concurrent.TimeoutException;
...
@@ -15,11 +15,11 @@ import java.util.concurrent.TimeoutException;
public
class
GatewayDevice
{
public
class
GatewayDevice
{
private
static
final
Executor
EXECUTOR
=
Executors
.
newCachedThreadPool
();
private
static
final
Executor
EXECUTOR
=
Executors
.
newCachedThreadPool
();
// 设备id
// 设备id
private
static
final
String
DEV_TID
=
""
;
private
static
final
String
DEV_TID
=
"
替换
"
;
// 产品密钥
// 产品密钥
private
static
final
String
PROD_KEY
=
""
;
private
static
final
String
PROD_KEY
=
"
替换
"
;
// 设备私钥
// 设备私钥
private
static
final
String
PRIV_KEY
=
""
;
private
static
final
String
PRIV_KEY
=
"
替换
"
;
// 网关是否启用2步认证,相关设置在网关产品偏好里面设置
// 网关是否启用2步认证,相关设置在网关产品偏好里面设置
private
static
final
boolean
GATEWAY_DEVICE_TWO_FACTOR_AUTHENTICATION
=
true
;
private
static
final
boolean
GATEWAY_DEVICE_TWO_FACTOR_AUTHENTICATION
=
true
;
// 最大等待时间 毫秒
// 最大等待时间 毫秒
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment