when i test dubbo rest protocol, i configure like this according the office 
website
```
    <dubbo:application name="dubbo-rest"/>

    <!--<dubbo:registry address="zookeeper://127.0.0.1:2181"/>-->

    <!-- 用rest协议在8080端口暴露服务 -->
    <dubbo:protocol name="rest" port="8081" server="tomcat"/>

    <!-- 声明需要暴露的服务接口 -->
    <dubbo:service interface="com.boot.dubbo.CustomerService" 
ref="customerService"/>

    <!-- 和本地bean一样实现服务 -->
    <bean id="customerService" class="com.boot.dubbo.CustomerServiceImpl" />
```
but the error occur like this
```
java.lang.IllegalStateException: No such any registry to export service in 
provider 172.19.6.61 use dubbo version 2.6.2, Please add <dubbo:registry 
address="..." /> to your spring config. If you want unregister, please set 
<dubbo:service registry="N/A" />
        at 
com.alibaba.dubbo.config.AbstractInterfaceConfig.checkRegistry(AbstractInterfaceConfig.java:120)
 ~[dubbo-2.6.2.jar:2.6.2]
        at 
com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:310) 
~[dubbo-2.6.2.jar:2.6.2]
        at 
com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:216) 
~[dubbo-2.6.2.jar:2.6.2]
        at 
com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:123)
 ~[dubbo-2.6.2.jar:2.6.2]
        at 
com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:49)
 ~[dubbo-2.6.2.jar:2.6.2]
        at 
org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
 ~[spring-context-5.0.10.RELEASE.jar:5.0.10.RELEASE]
        at 
org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
 ~[spring-context-5.0.10.RELEASE.jar:5.0.10.RELEASE]
        at 
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
 ~[spring-context-5.0.10.RELEASE.jar:5.0.10.RELEASE]
        at 
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:400)
 ~[spring-context-5.0.10.RELEASE.jar:5.0.10.RELEASE]
        at 
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:354)
 ~[spring-context-5.0.10.RELEASE.jar:5.0.10.RELEASE]
        at 
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:886)
 ~[spring-context-5.0.10.RELEASE.jar:5.0.10.RELEASE]
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:161)
 ~[spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
 ~[spring-context-5.0.10.RELEASE.jar:5.0.10.RELEASE]
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
 ~[spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) 
[spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
        at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386)
 [spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:307) 
[spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1242) 
[spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1230) 
[spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
        at 
com.boot.dubbo.DubboRestApplication.main(DubboRestApplication.java:18) 
[classes/:na]

```
it is mean that i need to configure registry,when i configure registry,it works 
well.but i do not know why?the office website also does not specify
if you need the code expample to test,i can provide for you
please click the 
link[Dubbo-Rest](https://github.com/a601942905git/boot-dubbo/tree/master/boot-dubbo-rest)

[ Full content available at: 
https://github.com/apache/incubator-dubbo/issues/2707 ]
This message was relayed via gitbox.apache.org for 
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to