当前位置: 首页 > news >正文

网站用开源cms网站seo工具

网站用开源cms,网站seo工具,海口seo整站,wordpress多语好利弊一、安装Erlang与Rabbitmq 安装教程本教程是在centos8下试验的,其实linux系统的都差不多RabbitMQ官方:Messaging that just works — RabbitMQRabbitMQ是开源AMQP实现,服务器端用Erlang语言编写,Python、Ruby、 NET、Java、JMS、c…

一、安装Erlang与Rabbitmq

 安装教程本教程是在centos8下试验的,其实linux系统的都差不多RabbitMQ官方:Messaging that just works — RabbitMQRabbitMQ是开源AMQP实现,服务器端用Erlang语言编写,Python、Ruby、 NET、Java、JMS、c、PHP、action screcrive AMQP (高级消息队列协议)和高级消息队列协议是APP应用层协议的开放标准,是为面向消息的中间件而设计的。消息中间件主要用于组件之间的解耦,其中消息的发送方不需要知道消息使用者的存在,反之_rabbitmq安装https://blog.csdn.net/weixin_44545251/article/details/128216395

二、在springboot中使用rabbitmq

1.导入依赖

<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-amqp</artifactId>
</dependency>

2.编写配置文件

spring:rabbitmq:host: localhostport: 5672username: guestpassword: guest

3.配置一个队列

package com.example.Rabbtimq.config;import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;@Configuration
public class QueueAndExchangeConfig {@Bean("myFirstQueue")public Queue getFirstQueue(){return new Queue("my-first-queue");}
}

4.编写一个生产者类

package com.example.Rabbtimq.controller;import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;@RestController
@RequestMapping("producer")
public class RabbitMqController {@Autowiredprivate RabbitTemplate rabbitTemplate;@GetMapping("producerSendFirstQueue")public String sendMsg(String msg){rabbitTemplate.convertAndSend("my-first-queue",msg);return msg;}}

5.编写一个消费者监听队列中的消息

package com.example.Rabbtimq.controller;import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;@Component
public class ConsumerHandler {@RabbitListener(queues = "my-first-queue")public void getFirstQueue(String msg){System.out.println("消费者1:"+msg);}
}

6.使用接口工具调生产接口

7.查看图形化界面

http://www.hkea.cn/news/822815/

相关文章:

  • 河南第二波疫情最新消息淘宝关键词优化技巧教程
  • 优化好的网站做企业网站百度代理公司
  • 外贸b2c网站如何做推广百度电话人工服务
  • 百度怎样做网站并宣传网站2023上海又出现疫情了
  • wordpress后台登录慢阳山网站seo
  • 深圳网站建设企网络推广运营途径
  • 给自己女朋友做的网站yandex搜索引擎
  • 购物网站建设教程怎么在网上做广告宣传
  • 冠县做网站推广网站怎么制作
  • 开封 网站建设苹果被曝开发搜索引擎对标谷歌
  • 东莞虎门高铁站百度客户端电脑版下载
  • 建网站怎么挣钱的学seo推广
  • 自如网站做的好 服务哪个网站学seo是免费的
  • 国外网站阻止国内访问怎么做竞价推广工具
  • 建设一个网站需要哪些方面的开支百度人工客服
  • 品牌网站建设-建站之路最新疫情新闻100字
  • 东莞网站优化科技有限公司怀柔网站整站优化公司
  • 郑州网站建设联系方式外链是什么意思
  • 用wordpress做网站教程电脑优化大师有用吗
  • 佛山企业网站制作今日热点新闻事件
  • 企业网站网络推广黑帽seo培训
  • 欧美做的爱爱网站有哪些广告推广赚钱
  • 泉州网站建设工作室谷歌seo价格
  • 国建设委员会网站百度推广一天烧几千
  • 做网站 花园路国贸营销推广方案包括哪些内容
  • 做商城网站哪里买口碑营销属于什么营销
  • 鞋子 东莞网站建设真正的免费建站在这里
  • 网站上微信的链接怎么做项目平台
  • 做网站后有人抢注关键词网络营销方案策划论文
  • 苏州网站建设网站seo优化的方法