dubbo-spring-boot-project
dubbo-spring-boot-project copied to clipboard
Spring Boot Project for Apache Dubbo
1.已经启动ubbo-nacos-service-introspection-provider-sample应用,nacos注册中心查看已注册 2.启动dubbo-nacos-service-introspection-consumer-sample应用,控制台报错 ```` "C:\Program Files\jdk-11.0.9.101-hotspot\bin\java.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:F:\idea\IntelliJ IDEA 2020.2\lib\idea_rt.jar=58367:F:\idea\IntelliJ IDEA 2020.2\bin" -Dfile.encoding=UTF-8 -classpath E:\dubbo-spring-boot-project\dubbo-spring-boot-samples\service-introspection-samples\nacos-samples\consumer-sample\target\classes;D:\maven\org\springframework\boot\spring-boot-starter\2.3.0.RELEASE\spring-boot-starter-2.3.0.RELEASE.jar;D:\maven\org\springframework\boot\spring-boot\2.3.0.RELEASE\spring-boot-2.3.0.RELEASE.jar;D:\maven\org\springframework\spring-context\5.2.6.RELEASE\spring-context-5.2.6.RELEASE.jar;D:\maven\org\springframework\spring-aop\5.2.6.RELEASE\spring-aop-5.2.6.RELEASE.jar;D:\maven\org\springframework\spring-beans\5.2.6.RELEASE\spring-beans-5.2.6.RELEASE.jar;D:\maven\org\springframework\spring-expression\5.2.6.RELEASE\spring-expression-5.2.6.RELEASE.jar;D:\maven\org\springframework\boot\spring-boot-autoconfigure\2.3.0.RELEASE\spring-boot-autoconfigure-2.3.0.RELEASE.jar;D:\maven\org\springframework\boot\spring-boot-starter-logging\2.3.0.RELEASE\spring-boot-starter-logging-2.3.0.RELEASE.jar;D:\maven\org\apache\logging\log4j\log4j-to-slf4j\2.13.2\log4j-to-slf4j-2.13.2.jar;D:\maven\org\apache\logging\log4j\log4j-api\2.13.2\log4j-api-2.13.2.jar;D:\maven\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;D:\maven\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;D:\maven\org\springframework\spring-core\5.2.6.RELEASE\spring-core-5.2.6.RELEASE.jar;D:\maven\org\springframework\spring-jcl\5.2.6.RELEASE\spring-jcl-5.2.6.RELEASE.jar;D:\maven\org\yaml\snakeyaml\1.26\snakeyaml-1.26.jar;D:\maven\org\apache\dubbo\dubbo-spring-boot-starter\2.7.7\dubbo-spring-boot-starter-2.7.7.jar;D:\maven\org\apache\dubbo\dubbo-spring-boot-autoconfigure\2.7.7\dubbo-spring-boot-autoconfigure-2.7.7.jar;D:\maven\org\apache\dubbo\dubbo-spring-boot-autoconfigure-compatible\2.7.7\dubbo-spring-boot-autoconfigure-compatible-2.7.7.jar;D:\maven\org\apache\dubbo\dubbo\2.7.7\dubbo-2.7.7.jar;D:\maven\com\alibaba\spring\spring-context-support\1.0.6\spring-context-support-1.0.6.jar;D:\maven\io\netty\netty-all\4.1.49.Final\netty-all-4.1.49.Final.jar;D:\maven\com\google\code\gson\gson\2.8.6\gson-2.8.6.jar;D:\maven\com\alibaba\dubbo-registry-nacos\2.7.7\dubbo-registry-nacos-2.7.7.jar;D:\maven\org\apache\dubbo\dubbo-registry-api\2.7.7\dubbo-registry-api-2.7.7.jar;D:\maven\org\apache\dubbo\dubbo-cluster\2.7.7\dubbo-cluster-2.7.7.jar;D:\maven\org\apache\dubbo\dubbo-rpc-api\2.7.7\dubbo-rpc-api-2.7.7.jar;D:\maven\org\apache\dubbo\dubbo-serialization-api\2.7.7\dubbo-serialization-api-2.7.7.jar;D:\maven\org\apache\dubbo\dubbo-remoting-api\2.7.7\dubbo-remoting-api-2.7.7.jar;D:\maven\org\apache\dubbo\dubbo-container-api\2.7.7\dubbo-container-api-2.7.7.jar;D:\maven\org\apache\dubbo\dubbo-metadata-api\2.7.7\dubbo-metadata-api-2.7.7.jar;D:\maven\org\apache\dubbo\dubbo-common\2.7.7\dubbo-common-2.7.7.jar;D:\maven\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;D:\maven\log4j\log4j\1.2.16\log4j-1.2.16.jar;D:\maven\org\javassist\javassist\3.20.0-GA\javassist-3.20.0-GA.jar;D:\maven\com\alibaba\fastjson\1.2.68\fastjson-1.2.68.jar;D:\maven\commons-io\commons-io\2.6\commons-io-2.6.jar;D:\maven\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;D:\maven\com\alibaba\nacos\nacos-client\1.2.1\nacos-client-1.2.1.jar;D:\maven\com\alibaba\nacos\nacos-common\1.2.1\nacos-common-1.2.1.jar;D:\maven\org\apache\commons\commons-lang3\3.10\commons-lang3-3.10.jar;D:\maven\com\alibaba\nacos\nacos-api\1.2.1\nacos-api-1.2.1.jar;D:\maven\com\google\guava\guava\22.0\guava-22.0.jar;D:\maven\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;D:\maven\com\google\errorprone\error_prone_annotations\2.0.18\error_prone_annotations-2.0.18.jar;D:\maven\com\google\j2objc\j2objc-annotations\1.1\j2objc-annotations-1.1.jar;D:\maven\org\codehaus\mojo\animal-sniffer-annotations\1.14\animal-sniffer-annotations-1.14.jar;D:\maven\commons-codec\commons-codec\1.14\commons-codec-1.14.jar;D:\maven\com\fasterxml\jackson\core\jackson-core\2.11.0\jackson-core-2.11.0.jar;D:\maven\com\fasterxml\jackson\core\jackson-databind\2.11.0\jackson-databind-2.11.0.jar;D:\maven\com\fasterxml\jackson\core\jackson-annotations\2.11.0\jackson-annotations-2.11.0.jar;D:\maven\io\prometheus\simpleclient\0.5.0\simpleclient-0.5.0.jar;E:\dubbo-spring-boot-project\dubbo-spring-boot-samples\sample-api\target\classes;D:\maven\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\maven\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\maven\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar org.apache.dubbo.spring.boot.sample.consumer.bootstrap.DubboNacosServiceIntrospectionConsumerBootstrap log4j:WARN No appenders could be found for logger (org.apache.dubbo.common.logger.LoggerFactory)....
This repo has been archived. All of the implements have been moved to [apache/dubbo](https://github.com/apache/dubbo). Please refer to https://github.com/apache/dubbo/tree/3.0/dubbo-spring-boot. All latest versions will be released with dubbo core.
dubbo-spring-boot-starter 3.0.4及一下,在多网卡的情况下会随机选择IP绑定端口,即使通过设置 ``` dubbo.provider.host = ${HOSTNAME} ``` 本质上还是会从底层随机选择IP绑定,这样即使在服务发现里面看上去是正常的,但是由于IP没绑定对,导致无法通讯。 建议: 多网卡的情况下,直接将端口绑定到0.0.0.0。
dubbo-spring-boot-starter 2.7.15 springboot 2.3.2.RELEASE 使用nacos 2.0.3作为注册中心 依次启动服务提供者和消费者,能正常调用,当重启服务消费者,调用会报无法找到服务提供者 org.apache.dubbo.rpc.RpcException: No provider available from registry xxxxx:80 for service ....... 再重启服务提供者,则恢复正常 配置 ``` # Dubbo dubbo: scan: # dubbo 服务扫描基准包 base-packages: com.xxxx.xxxx.item.service #...
org.springframework.boot spring-boot-starter-parent 2.5.4 org.apache.dubbo dubbo 2.7.8 org.springframework * ![image](https://user-images.githubusercontent.com/89564484/144163303-69fdbd8c-9774-4abd-88ca-216ae3867bbc.png) ![image](https://user-images.githubusercontent.com/89564484/144163368-b2852b87-a9d1-4fa4-800c-ac41a19fbe52.png) org.apache.dubbo 2.7.8 配置项目为既是服务提供者又是消费者时启动出错
我使用的是springboot2.1.15对应dubbo0.2.0,其中使用了外部的配置文件@PropertySource("file:D:/opt/config/taskcenter/a.properties"),占位符${},发现dubbo加载的时候不会把占位符转换为我要的参数,如何是好?
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'CkdPatientController': Injection of @DubboReference dependencies is failed; nested exception is java.lang.IllegalArgumentException: Can not set com.sersmed.micro.jc_ckd.service.clerk.PatientTaskService field com.sersmed.micro.services.consumer_clerk_app.controller.jc_ckd.diagnosis.CkdPatientController.patientTaskService to com.sun.proxy.$Proxy72 at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.postProcessPropertyValues(ReferenceAnnotationBeanPostProcessor.java:306) ~[dubbo-3.0.2.1.jar:3.0.2.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1418)...
在使用Dubbo整合Nacos的时候发现生产者启动一直都没问题,但是消费者这块启动的时候一直报错,竟然是找到我 Dao 和 Service,但是这种报错不应该属于Spring里的吗,我使用@DubboReference好像没有引用到服务实例,具体是什么原因呢?
➜ dubbo /usr/lib/jvm/java-1.15.0-openjdk-amd64/bin/java -XX:+ShowCodeDetailsInExceptionMessages -Dfile.encoding=UTF-8 @/tmp/cp_1j6f4rp1yun3giog2xjte3k9u.argfile org.apache.dubbo.spring.boot.sample.provider.bootstrap.DubboRegistryZooKeeperProviderBootstrap log4j:WARN No appenders could be found for logger (org.apache.dubbo.common.logger.LoggerFactory). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. 2020-12-20...
OS: win10 64 IDE: IDEA-2019.1 I have set a property in appplication.yml like this: dubbo: protocol: port: 20880 and exception throws, java.lang.IllegalStateException: Invalid name="org.apache.dubbo.config.ProtocolConfig#0" contains illegal character, only digit, letter,...