Springboot 如何配置dubbo monitor

springmvc只要在配置文件中加入

<dubbo:monitor protocol="registry"/>

就可以了
springboot呢?

阅读 3.9k
2 个回答

没有太明白,是用springboot启动dubbo monitor,还是使用springboot启动dubbo服务,dubbo服务启用monitor?

springboo本身没有太多的含义,只是在spring基础上进行了一层应用封装,它不改变之前的配置方法。
你可以按照下列步骤尝试一下:

  1. 在项目中添加xxx-servlet.xml文件,放于resources/config/文件下
  2. 参照springmvc完成xxx-servlet.xml的配置,在文件中添加<dubbo:monitor protocol="registry"/>
  3. 在spingboot的启动类上添加@ImportResource({"classpath:config/xxx-servlet.xml"})手工引入自定义配置
  4. 启动程序,查看效果

dubbo.monitor.protocol=registry

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题