All Downloads are FREE. Search and download functionalities are using the official Maven repository.

spring.dubbo.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
	http://code.alibabatech.com/schema/dubbo
	http://code.alibabatech.com/schema/dubbo/dubbo.xsd"
	default-lazy-init="false">
	<!-- 提供方应用名称信息,这个相当于起一个名字,我们dubbo管理页面比较清晰是哪个应用暴露出来的 -->
	<dubbo:application name="${rpc.registry.name}"
		logger="slf4j" />
	<!-- 使用zookeeper注册中心暴露服务地址 -->
	<dubbo:registry address="${rpc.registry.address}" check="false"
		timeout="${rpc.connect.timeout}" file="${rpc.cache.dir}/dubbo-${rpc.registry.name}.cache" />
	<!-- 用dubbo协议在20880端口暴露服务 -->
	<dubbo:protocol name="dubbo" port="${rpc.protocol.port}"
		threads="${rpc.protocol.threads}" />
	<!-- 服务端要暴露的服务接口,注解@com.alibaba.dubbo.config.annotation.Service -->
	<dubbo:annotation package="com.wichell" />
	<!-- 服务消费端配置 -->
	<dubbo:consumer loadbalance="leastactive" check="false"
		timeout="${rpc.request.timeout}" retries="${rpc.consumer.retries}" />
</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy