1. Dubbo 的四种配置方式
1.1 配置
Dubbo 是使用Spring 的 Shema 进行扩展标签和解析配置,所以我们能像 Spring 的 配置方式一样进行配置。
<? version=\"1.0\" encoding=\"UTF-8\"?><beans ns=\"http://www.spring work.org/schema/beans\"
ns:xsi=\"http://www.w3.org/2001/ Schema-instance\"
ns:dubbo=\"http://code.alibabatech.com/schema/dubbo\"
xsi:schemaLocation=\"http://www.spring work.org/schema/beans
http://www.spring work.org/schema/beans/spring-beans-4.3.xsd
http://code.alibabatech.com/schema/dubbo
http://code.alibabatech.com/schema/dubbo/dubbo.xsd\">
<!-- 提供者的应用名 -->
<dubbo:application name=\"dubbo-server\" />
<!-- 使用ZK 注册中心的地址 -->
<dubbo:registry address=\"zookeeper://127.0.0.1:2181\" />
<!-- 用dubbo协议在20880端口暴露服务 -->
<dubbo:protocol name=\"dubbo\" port=\"20880\" />
<!-- 声明需要暴露的服务接口 -->
<dubbo:service interface=\"com.bill.api.IHelloService\" ref=\"helloService\" timeout=\"20000\" />
<!-- 和本地bean一样实现服务 -->
<bean id=\"helloService\" class=\"com.bill.HellServiceImpl\" />
继续阅读与本文标签相同的文章
-
安!排!微信聊天记录的最佳恢复方法,拿走不谢!
2026-05-19栏目: 教程
-
一线丨滴滴与清华成立未来出行联合研究中心
2026-05-19栏目: 教程
-
如何监管数字健康和人工智能产品?FDA新发布两份指南予以明确
2026-05-19栏目: 教程
-
Linux系统权限管理
2026-05-19栏目: 教程
-
滴滴与清华成立未来出行联合研究中心
2026-05-19栏目: 教程
