You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "fuhao715 (GitHub)" <gi...@apache.org> on 2018/10/26 11:01:39 UTC

[GitHub] [incubator-dubbo] fuhao715 opened issue #2695: dubbo配置支持多协议,不能在service指定其中某一种协议

### Environment

* Dubbo version: 2.6.2
* Operating System version: mac
* Java version: 1.8
配置如下:
  protocols:
    protocol1:
      name: dubbo
      id: dubbo
      status: server
    protocol2:
      id: rest
      name: rest
      status: server
      server: tomcat
      contextpath: api/swift/v1
      extension: com.alibaba.dubbo.rpc.protocol.rest.support.LoggingFilter

服务注释:
@Service(
        version = "${demo.service.version}",
        application = "${dubbo.application.id}",
        registry = "${dubbo.registry.id}",
        protocol = "dubbo"
)

问题: 无法指定服务的协议类型。

建议:
       service协议类型若有则是指定类型,否则按照配置协议类型暴露




[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2695 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] mercyblitz commented on issue #2695: dubbo配置支持多协议,不能在service指定其中某一种协议

Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
Please try 2.6.x branch,  The latest code has supported it.

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2695 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] fuhao715 commented on issue #2695: dubbo配置支持多协议,不能在service指定其中某一种协议

Posted by "fuhao715 (GitHub)" <gi...@apache.org>.
提示错误如下:
Cannot resolve reference to bean 'dubbo' while setting bean property 'protocl'

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2695 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] beiwei30 commented on issue #2695: dubbo配置支持多协议,不能在service指定其中某一种协议

Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
let's close for now.

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2695 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] fuhao715 commented on issue #2695: dubbo配置支持多协议,不能在service指定其中某一种协议

Posted by "fuhao715 (GitHub)" <gi...@apache.org>.
提示错误如下:

===2018-11-09 15:36:06.373 INFO  com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor Line:85  - The properties of bean [name : dubbo-provider-local] have been binding by prefix of configuration properties : dubbo.application
===2018-11-09 15:36:06.389 INFO  com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor Line:85  - The properties of bean [name : my-registry] have been binding by prefix of configuration properties : dubbo.registry
===2018-11-09 15:36:06.420 INFO  com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor Line:85  - The properties of bean [name : com.alibaba.dubbo.config.ProviderConfig#0] have been binding by prefix of configuration properties : dubbo.provider
===2018-11-09 15:36:06.622 INFO  org.springframework.web.servlet.handler.SimpleUrlHandlerMapping Line:373 - Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
===2018-11-09 15:36:06.743 INFO  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter Line:574 - Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@7ac72cab: startup date [Fri Nov 09 15:36:00 CST 2018]; root of context hierarchy
===2018-11-09 15:36:06.853 INFO  org.springframework.web.servlet.handler.SimpleUrlHandlerMapping Line:373 - Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
===2018-11-09 15:36:06.854 INFO  org.springframework.web.servlet.handler.SimpleUrlHandlerMapping Line:373 - Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
===2018-11-09 15:36:06.947 INFO  com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor Line:85  - The properties of bean [name : protocol1] have been binding by prefix of configuration properties : dubbo.protocols.protocol1
===2018-11-09 15:36:06.952 INFO  com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor Line:85  - The properties of bean [name : protocol2] have been binding by prefix of configuration properties : dubbo.protocols.protocol2
===2018-11-09 15:36:07.622 INFO  org.springframework.boot.devtools.autoconfigure.OptionalLiveReloadServer Line:57  - LiveReload server is running on port 35729
===2018-11-09 15:36:07.753 WARN  org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext Line:558 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ServiceBean:defaultDemoService:com.swift.boot.dubbo.demo.api.DemoService:${demo.service.version}': Cannot resolve reference to bean 'dubbo' while setting bean property 'protocols' with key [0]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'dubbo' available
===2018-11-09 15:36:07.760 INFO  org.springframework.jmx.export.annotation.AnnotationMBeanExporter Line:451 - Unregistering JMX-exposed beans on shutdown
===2018-11-09 15:36:07.876 INFO  com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor Line:251 - class com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor was destroying!
===2018-11-09 15:36:07.882 INFO  org.apache.catalina.core.StandardService Line:180 - Stopping service [Tomcat]
===2018-11-09 15:36:07.900 INFO  org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener Line:101 - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
===2018-11-09 15:36:08.001 ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter Line:42  - 

***************************
APPLICATION FAILED TO START
***************************

Description:

A component required a bean named 'dubbo' that could not be found.


Action:

Consider defining a bean named 'dubbo' in your configuration.

===2018-11-09 15:36:08.759 INFO  com.alibaba.dubbo.config.AbstractConfig Line:81  -  [DUBBO] Run shutdown hook now., dubbo version: 2.6.2, current host: 192.169.20.250
===2018-11-09 15:36:08.761 INFO  com.alibaba.dubbo.registry.support.AbstractRegistryFactory Line:64  -  [DUBBO] Close all registries [], dubbo version: 2.6.2, current host: 192.169.20.250

Process finished with exit code 1


[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2695 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] mercyblitz commented on issue #2695: dubbo配置支持多协议,不能在service指定其中某一种协议

Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
Please try 2.6.x branch,  The latest code has supported it.

See [here](https://github.com/apache/incubator-dubbo/pull/2687/commits/cb7da3ea0265600a9dde93669e562598a50f6aa5).

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2695 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] beiwei30 commented on issue #2695: dubbo配置支持多协议,不能在service指定其中某一种协议

Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
@fuhao715 can you provide a sample to reproduce this issue on your GitHub?

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2695 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] beiwei30 closed issue #2695: dubbo配置支持多协议,不能在service指定其中某一种协议

Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
[ issue closed by beiwei30 ]

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2695 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org