File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed
spring-boot-rabbitmq/src/main/java/io/ymq/rabbitmq/config Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 1313 - Wechat:关注公众号,搜云库,专注于开发技术的研究与知识分享
1414
1515![ 关注公众号-搜云库] ( http://www.ymq.io/images/souyunku.png " 搜云库 ")
16+
17+
18+ db.createUser(
19+ {
20+ user: "admin",
21+ pwd: "zgzz2025",
22+ roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
23+ }
24+ )
25+
26+ db.grantRolesToUser("admin", [ {role: "dbOwner", db: "test" }] );
27+
28+ db.createCollection('var_setting')
29+ db.createCollection('var_value')
30+
31+ netstat -tunlp|grep mongo
32+ mongod --config /var/lib/mongodb/conf/rs2.conf &
33+
34+ netstat -tunlp|grep mongo
35+ mongod --config /var/lib/mongodb/conf/rs2.conf &
36+
Original file line number Diff line number Diff line change 11spring.application.name =spring-boot-mongodb
22# mongodb
3- spring.data.mongodb.uri =mongodb://192.168.252.121:20000,192.168.252.122:20000,192.168.252.12:20000/demo
3+ # spring.data.mongodb.uri=mongodb://192.168.252.121:20000,192.168.252.122:20000,192.168.252.12:20000/demo
4+
5+ spring.data.mongodb.uri =mongodb://39.106.165.204:8700
6+ spring.data.mongodb.username =admin
7+ spring.data.mongodb.password =zgzz2025
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public String topicSendMessage(final String name) {
2323
2424 String context = "hello " +name +" --" + new Date ().getTime ();
2525 System .out .println (context );
26- this .rabbitTemplate .convertAndSend ("topicExchange" , "topic.message.123 " , context );
26+ this .rabbitTemplate .convertAndSend ("topicExchange" , "topic.message" , context );
2727 return context ;
2828 }
2929}
You can’t perform that action at this time.
0 commit comments