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

网站出现风险如何处理立邦刷新服务多少钱一平米

网站出现风险如何处理,立邦刷新服务多少钱一平米,给别人网站做跳转,腾讯云市场 wordpress前言#xff1a;只有消费者部分#xff0c;没有记录生产者部分 结构图 配置类 可以xml配置#xff0c;也可以配置类#xff0c;二者可以相互转化。两种bean注入的方式。 import org.springframework.amqp.rabbit.connection.CachingConnectionFactory; import org.spring…前言只有消费者部分没有记录生产者部分 结构图 配置类 可以xml配置也可以配置类二者可以相互转化。两种bean注入的方式。 import org.springframework.amqp.rabbit.connection.CachingConnectionFactory; import org.springframework.amqp.rabbit.connection.ConnectionFactory; import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.amqp.rabbit.listener.MessageListenerContainer; import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer; import org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter; import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration;Configuration public class DbDataQueueConsumeConfig {Value(${rabbitmq.host})private String host;Value(${rabbitmq.port:5672}) // Value(#{new Integer(${rabbitmq.port})})private Integer port;Value(${rabbitmq.username})private String username;Value(${rabbitmq.password})private String password;Value(${rabbitmq.virtual-host})private String virtualHost;Value(${rabbitmq.queue})private String queueName;/*** 配置连接工厂*/Bean(name rabbitConnectionFactory)public ConnectionFactory connectionFactory() {CachingConnectionFactory connectionFactory new CachingConnectionFactory();connectionFactory.setHost(host);connectionFactory.setPort(port);connectionFactory.setUsername(username);connectionFactory.setPassword(password);connectionFactory.setVirtualHost(virtualHost);return connectionFactory;}/*** 配置 RabbitTemplate用于发送消息*/Beanpublic RabbitTemplate rabbitTemplate(Qualifier(rabbitConnectionFactory) ConnectionFactory connectionFactory) {RabbitTemplate rabbitTemplate new RabbitTemplate(connectionFactory);rabbitTemplate.setMessageConverter(jsonMessageConverter());return rabbitTemplate;}Beanpublic Jackson2JsonMessageConverter jsonMessageConverter() {return new Jackson2JsonMessageConverter();}/*** 配置消息监听容器*/Beanpublic MessageListenerContainer messageListenerContainer(ConnectionFactory connectionFactory, BdDataQueueListener bdDataQueueListener) {SimpleMessageListenerContainer container new SimpleMessageListenerContainer();container.setConnectionFactory(connectionFactory);container.setQueueNames(queueName);container.setMessageListener(new MessageListenerAdapter(bdDataQueueListener));return container;}} 配置文件中配置好rabbitmq服务的地址 rabbitmq.hostxxx.xxx.xxx.xxx rabbitmq.port3011 rabbitmq.usernameusername rabbitmq.passwordpassword rabbitmq.virtual-host/xxx rabbitmq.queuequeuename消费者 Component public class BdDataQueueListener implements MessageListener {Overridepublic void onMessage(Message message) {try {// 这里写业务逻辑} catch (Exception e) {}}} 重要部分都在上面。其余的不在放出来。 参考文章 文章1 文章2
http://www.dnsts.com.cn/news/261287.html

相关文章:

  • 西安seo搜推宝实时seo排名点击软件
  • 做网站的骗术织梦做中英文网站详细步骤
  • 上海最好网站建设公司南平购物网站开发设计
  • 网站建设项目管理绩效情况分析高端网咖
  • 江西南昌网站建设哪家公司好什么是网站国内高速空间
  • 做网站认证违法吗左侧固定导航栏的网站
  • 安徽企业网站建设wordpress 怎么登陆
  • 用dw制作个介绍家乡网站ios7 风格 网站
  • app试玩网站制作盘州市城乡建设局网站
  • 栅格布局 网站设计哪些网站容易做
  • 北京规划网站wordpress 通用代码
  • 汕头市做网站易店无忧官网
  • 怎么看一个网站做没做竞价免费公网服务器
  • 网站联盟营销消除wordpress
  • 湖南沙坪建设集团有限公司网站网站备案是需要去哪里做
  • 天津网站开发平台本地房产交易信息网
  • 网站建设的实验结论马蜂窝网站做的重点
  • 一个网站需要怎么做海口网站建设咨询
  • 福州网站建设询q479185700上快炉石吐司做的网站
  • 一般用什么做网站首页网站建设的栏目策划
  • 海外 网站 推广wordpress安装卡住了
  • 松江网站建设推广Https全局wordpress
  • 建设网站会员湖北省城乡建设厅网站首页
  • 韩国网站设计欣赏做网站优化的好处
  • 上海网站备案人工服务器360平台怎么做网站优化
  • 长沙网站建设好处银行营销活动方案
  • 北京网站页面设计网站制作电话多少
  • 阿里巴巴怎么做不花钱的网站网站开发上证k线
  • 海西州公司网站建设百度免费下载
  • 怎么查网站域名备案山东德州如何网站建设教程