Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
Project
Project
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
station
YeeAmosFireAutoSysRoot
Commits
c81fa840
Commit
c81fa840
authored
May 17, 2022
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加rocketmq测试接口
parent
e194d4ff
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+17
-0
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+1
-1
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
c81fa840
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.rocketmq.spring.core.RocketMQTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -318,4 +320,19 @@ public class View3dController extends BaseController {
...
@@ -318,4 +320,19 @@ public class View3dController extends BaseController {
return
CommonResponseUtil
.
success
(
view3dService
.
listPointsByRegionId
(
regionId
,
type
));
return
CommonResponseUtil
.
success
(
view3dService
.
listPointsByRegionId
(
regionId
,
type
));
}
}
@Autowired
private
RocketMQTemplate
rocketMQTemplate
;
@ApiOperation
(
value
=
"rocketMQ消息推送测试"
,
notes
=
"rocketMQ消息推送测试"
)
@PostMapping
(
value
=
"rocketMQ/send"
)
public
CommonResponse
rocketMQTemplate
(
@RequestParam
(
required
=
true
,
defaultValue
=
"all"
)
String
topic
,
@RequestBody
Map
msg
)
{
try
{
rocketMQTemplate
.
convertAndSend
(
topic
,
msg
);
}
catch
(
Exception
e
)
{
return
CommonResponseUtil
.
failure
(
e
.
getMessage
());
}
return
CommonResponseUtil
.
success
(
msg
);
}
}
}
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
c81fa840
...
@@ -51,7 +51,7 @@ emqx.user-name=admin
...
@@ -51,7 +51,7 @@ emqx.user-name=admin
emqx.password
=
public
emqx.password
=
public
#rocketmq生产者配置
#rocketmq生产者配置
rocketmq.name-server
=
localhost
:9876
rocketmq.name-server
=
172.16.3.51
:9876
rocketmq.producer.group
=
my-group
rocketmq.producer.group
=
my-group
rocketmq.producer.sendMessageTimeout
=
300000
rocketmq.producer.sendMessageTimeout
=
300000
rocket-plan-topic
=
template_topic
rocket-plan-topic
=
template_topic
...
...
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