server的配置
<util:properties id="environment" location="classpath:environment.properties" />
<!-- 提供方应用信息,用于计算依赖关系 -->
<dubbo:application name="hello-world-app" />
<!-- 使用multicast广播注册中心暴露服务地址 ,127.0.0.1:2182,127.0.0.1:2183 -->
<dubbo:registry protocol="zookeeper" address="127.0.0.1:2181" />
<!-- 用dubbo协议在20880端口暴露服务 -->
<dubbo:protocol name="dubbo" port="20880" />
<!-- <dubbo:annotation package="com.sina.fenqi.dobbu" /> -->
<dubbo:service interface="com.sina.fenqi.dobbu.DemoService" ref="demoService" />
<!-- 和本地bean一样实现服务 -->
<bean id="demoService" class="com.sina.fenqi.dobbu.DemoServiceImpl" /> <util:properties id="environment" location="classpath:environment.properties" />
<!-- 提供方应用信息,用于计算依赖关系 -->
<dubbo:application name="hello-world-app" />
<!-- 使用multicast广播注册中心暴露服务地址 ,127.0.0.1:2182,127.0.0.1:2183 -->
<dubbo:registry protocol="zookeeper" address="127.0.0.1:2181" />
<!-- 用dubbo协议在20880端口暴露服务 -->
<dubbo:protocol name="dubbo" port="20880" />
<!-- <dubbo:annotation package="com.sina.fenqi.dobbu" /> -->
<dubbo:service interface="com.sina.fenqi.dobbu.DemoService" ref="demoService" />
<!-- 和本地bean一样实现服务 -->
<bean id="demoService" class="com.sina.fenqi.dobbu.DemoServiceImpl" />
客服端配置
<!-- 提供方应用信息,用于计算依赖关系 -->
<dubbo:application name="hello-world-app-client" />
<!-- 使用multicast广播注册中心暴露服务地址 -->
<!-- <dubbo:registry protocol="zookeeper" address="127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183" check="false"/> -->
<dubbo:registry protocol="zookeeper" address="127.0.0.1:2181" />
<dubbo:reference id="demoService" interface="com.sina.fenqi.dubbu.DemoService" check="false" />
在dobbuamin的访问控制里面配置 了 192.168.31.242.还是没用
2016-03-11 03:04:12 main [INFO ] com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry (AbstractRegistry.java:302) - [DUBBO] Register: consumer://192.168.31.242/com.sina.fenqi.dubbu.DemoService?application=hello-world-app-client&category=consumers&check=false&dubbo=2.5.3&interface=com.sina.fenqi.dubbu.DemoService&methods=sayHello&pid=4965&side=consumer×tamp=1457636652743, dubbo version: 2.5.3, current host: 192.168.31.242
2016-03-11 03:04:13 main [INFO ] com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry (AbstractRegistry.java:325) - [DUBBO] Subscribe: consumer://192.168.31.242/com.sina.fenqi.dubbu.DemoService?application=hello-world-app-client&category=providers,configurators,routers&check=false&dubbo=2.5.3&interface=com.sina.fenqi.dubbu.DemoService&methods=sayHello&pid=4965&side=consumer×tamp=1457636652743, dubbo version: 2.5.3, current host: 192.168.31.242
请问是怎么解决的?多谢