Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
glsx-smart-message-channel
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 36ee086d
authored
May 07, 2021
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]代码规范
1 parent
4bd8993b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
src/main/java/cn/com/glsx/consumer/TestController.java
src/main/java/cn/com/glsx/consumer/TestController.java
View file @
36ee086
package
cn
.
com
.
glsx
.
consumer
;
package
cn
.
com
.
glsx
.
consumer
;
import
cn.com.glsx.consumer.client.SmartPlatformClient
;
import
cn.com.glsx.consumer.service.DeviceService
;
import
cn.com.glsx.consumer.service.InfoService
;
import
cn.com.glsx.consumer.service.InfoService
;
import
com.alibaba.nacos.common.utils.MD5Utils
;
import
com.alibaba.nacos.common.utils.MD5Utils
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -8,6 +10,7 @@ import org.springframework.stereotype.Controller;
...
@@ -8,6 +10,7 @@ import org.springframework.stereotype.Controller;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
/**
/**
...
@@ -22,10 +25,20 @@ public class TestController {
...
@@ -22,10 +25,20 @@ public class TestController {
@Autowired
@Autowired
private
InfoService
infoService
;
private
InfoService
infoService
;
@Autowired
private
DeviceService
deviceService
;
@RequestMapping
(
value
=
"/test"
,
method
=
{
RequestMethod
.
POST
})
@RequestMapping
(
value
=
"/test"
,
method
=
{
RequestMethod
.
POST
})
@ResponseBody
@ResponseBody
public
void
test
(
@RequestBody
String
json
)
{
public
void
test
(
@RequestBody
String
json
)
{
infoService
.
processMessage
(
json
);
infoService
.
processMessage
(
json
);
}
}
@RequestMapping
(
value
=
"/test1"
,
method
=
{
RequestMethod
.
GET
})
@ResponseBody
public
void
test1
(
@RequestParam
String
id
)
{
System
.
out
.
println
(
deviceService
.
getDeviceName
(
id
));
}
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment