springboot与dubbo整合

2020-12-13 01:33

阅读:514

标签:city   配置   toc   col   host   ack   enc   dubbo   依赖   

1.添加依赖

	
		io.dubbo.springboot
			spring-boot-starter-dubbo
			${dubbo-spring-boot}org.springframework.boot
			spring-boot-starter-web
		org.springframework.boot
			spring-boot-starter-test
			testorg.springframework.boot
			spring-boot-starter-log4j
			1.3.8.RELEASE

配置属性文件

application.propertise

##dubbo 配置 服务端配置
spring.dubbo.application.name=provider                    //服务提供者
spring.dubbo.registry.address=zookeeper://127.0.0.1:2181  //zk地址
spring.dubbo.protocol.name=dubbo                    //协议
spring.dubbo.protocol.port=20880                    //协议端口
spring.dubbo.scan=com.example.springboot.service   //扫包路径

 

 

 

2.下载zookeeper

启动zkServer.cmd

3.下载dubbo-admin 

application.properties 属性文件的配置

#

server.port=7001
#server.servlet.context-path=/dubbo
spring.velocity.cache=false
spring.velocity.charset=UTF-8
spring.velocity.layout-url=/templates/default.vm
spring.messages.fallback-to-system-locale=false
spring.messages.basename=i18n/message
spring.root.password=root
spring.guest.password=guest

dubbo.registry.address=zookeeper://127.0.0.1:2181

 引入idea,启动dubbo-admin

访问  http://localhost:7001/

 

springboot与dubbo整合

标签:city   配置   toc   col   host   ack   enc   dubbo   依赖   

原文地址:https://www.cnblogs.com/ptcnblog/p/11002150.html


评论


亲,登录后才可以留言!