springboot整合dubbo服务启动报错 5C

SpringBoot1.5.1,Dubbo 2..8.4,JDK 1.8.0_171

zookeeper确定是启动的。

provider配置如下:

 <!--定义了提供方应用信息,用于计算依赖关系;在 dubbo-admin 或 dubbo-monitor 会显示这个名字,方便辨识-->
    <dubbo:application name="demotest-provider" owner="programmer" organization="dubbox"/>
    <!--使用 zookeeper 注册中心暴露服务,注意要先开启 zookeeper-->
    <dubbo:registry address="zookeeper://localhost:2181"/>
    <!-- 用dubbo协议在20880端口暴露服务 -->
    <dubbo:protocol name="dubbo" port="20880" />

    <!--使用 dubbo 协议实现定义好的接口-->
    <dubbo:service interface="cn.kaison.xblog.system.api.service.SystemService" ref="systemService" protocol="dubbo"></dubbo:service>

    <!--具体实现该接口的 bean-->
    <bean id="demoService" class="cn.kaison.xblog.system.provider.serviceImpl.SystemServiceImpl"></bean>

项目结构:
图片说明

启动后报错如下:
2018-04-20 00:43:04.775 WARN 18261 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cn.kaison.xblog.system.api.service.SystemService': Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError
2018-04-20 00:43:04.779 WARN 18261 --- [ main] o.s.boot.SpringApplication : Error handling failed (Error creating bean with name 'cn.kaison.xblog.system.api.service.SystemService': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.alibaba.dubbo.config.spring.ServiceBean)
2018-04-20 00:43:04.789 ERROR 18261 --- [ main] o.s.boot.SpringApplication : Application startup failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cn.kaison.xblog.system.api.service.SystemService': Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1155) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) ~[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) ~[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) ~[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) ~[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
at cn.kaison.xblog.system.provider.SysProviderApplication.main(SysProviderApplication.java:30) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na]
Caused by: java.lang.ExceptionInInitializerError: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_144]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_144]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_144]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_144]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1147) ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
... 20 common frames omitted
Caused by: java.lang.IllegalStateException: fail to create adaptive instance: java.lang.IllegalStateException: Can not create adaptive extenstion interface com.alibaba.dubbo.rpc.Protocol, cause: Failed to load extension class(interface: interface com.alibaba.dubbo.common.compiler.Compiler, class line: com.alibaba.dubbo.common.compiler.support.JavassistCompiler) in jar:file:/Users/xiaohuchen/Documents/_my_soft/mavenrepo/com/alibaba/dubbo/2.8.4/dubbo-2.8.4.jar!/META-INF/dubbo/internal/com.alibaba.dubbo.common.compiler.Compiler, cause: javassist/ClassPath
at com.alibaba.dubbo.common.extension.ExtensionLoader.getAdaptiveExtension(ExtensionLoader.java:459) ~[dubbo-2.8.4.jar:2.8.4]
at com.alibaba.dubbo.config.ServiceConfig.(ServiceConfig.java:62) ~[dubbo-2.8.4.jar:2.8.4]
... 27 common frames omitted
Caused by: java.lang.IllegalStateException: Can not create adaptive extenstion interface com.alibaba.dubbo.rpc.Protocol, cause: Failed to load extension class(interface: interface com.alibaba.dubbo.common.compiler.Compiler, class line: com.alibaba.dubbo.common.compiler.support.JavassistCompiler) in jar:file:/Users/xiaohuchen/Documents/_my_soft/mavenrepo/com/alibaba/dubbo/2.8.4/dubbo-2.8.4.jar!/META-INF/dubbo/internal/com.alibaba.dubbo.common.compiler.Compiler, cause: javassist/ClassPath
at com.alibaba.dubbo.common.extension.ExtensionLoader.createAdaptiveExtension(ExtensionLoader.java:723) ~[dubbo-2.8.4.jar:2.8.4]
at com.alibaba.dubbo.common.extension.ExtensionLoader.getAdaptiveExtension(ExtensionLoader.java:455) ~[dubbo-2.8.4.jar:2.8.4]
... 28 common frames omitted
Caused by: java.lang.IllegalStateException: Failed to load extension class(interface: interface com.alibaba.dubbo.common.compiler.Compiler, class line: com.alibaba.dubbo.common.compiler.support.JavassistCompiler) in jar:file:/Users/xiaohuchen/Documents/_my_soft/mavenrepo/com/alibaba/dubbo/2.8.4/dubbo-2.8.4.jar!/META-INF/dubbo/internal/com.alibaba.dubbo.common.compiler.Compiler, cause: javassist/ClassPath
at com.alibaba.dubbo.common.extension.ExtensionLoader.loadFile(ExtensionLoader.java:685) ~[dubbo-2.8.4.jar:2.8.4]
at com.alibaba.dubbo.common.extension.ExtensionLoader.loadExtensionClasses(ExtensionLoader.java:591) ~[dubbo-2.8.4.jar:2.8.4]
at com.alibaba.dubbo.common.extension.ExtensionLoader.getExtensionClasses(ExtensionLoader.java:567) ~[dubbo-2.8.4.jar:2.8.4]
at com.alibaba.dubbo.common.extension.ExtensionLoader.getAdaptiveExtensionClass(ExtensionLoader.java:728) ~[dubbo-2.8.4.jar:2.8.4]
at com.alibaba.dubbo.common.extension.ExtensionLoader.createAdaptiveExtension(ExtensionLoader.java:721) ~[dubbo-2.8.4.jar:2.8.4]
at com.alibaba.dubbo.common.extension.ExtensionLoader.getAdaptiveExtension(ExtensionLoader.java:455) ~[dubbo-2.8.4.jar:2.8.4]
at com.alibaba.dubbo.common.extension.ExtensionLoader.createAdaptiveExtensionClass(ExtensionLoader.java:738) ~[dubbo-2.8.4.jar:2.8.4]
at com.alibaba.dubbo.common.extension.ExtensionLoader.getAdaptiveExtensionClass(ExtensionLoader.java:732) ~[dubbo-2.8.4.jar:2.8.4]
at com.alibaba.dubbo.common.extension.ExtensionLoader.createAdaptiveExtension(ExtensionLoader.java:721) ~[dubbo-2.8.4.jar:2.8.4]
... 29 common frames omitted
Caused by: java.lang.NoClassDefFoundError: javassist/ClassPath
at java.lang.Class.forName0(Native Method) ~[na:1.8.0_144]
at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_144]
at com.alibaba.dubbo.common.extension.ExtensionLoader.loadFile(ExtensionLoader.java:627) ~[dubbo-2.8.4.jar:2.8.4]
... 37 common frames omitted
Caused by: java.lang.ClassNotFoundException: javassist.ClassPath
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_144]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_144]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[na:1.8.0_144]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_144]
... 40 common frames omitted

2个回答

    ===========这是你的配置文件部分内容============
    <!--使用 dubbo 协议实现定义好的接口-->
<dubbo:service interface="cn.kaison.xblog.system.api.service.SystemService" ref="systemService" protocol="dubbo"></dubbo:service>

<!--具体实现该接口的 bean-->
<bean id="demoService" class="cn.kaison.xblog.system.provider.serviceImpl.SystemServiceImpl"></bean>
    ===================================================
    暴露服务的时候用的ref名字是 sysrtemService, 而实现服务的bean的名称是 demoService; 
    把这两个名字改成一样就可以了。
cxh1299543968
KaisonChen 回复Ray_hurricane: 1299543968
一年多之前 回复
Ray_hurricane
RayKwok_ 回复cxh1299543968: 神奇, 发你QQ出来,我远程看下
一年多之前 回复
cxh1299543968
KaisonChen 回复Ray_hurricane: SystemServiceImpl是实现类
一年多之前 回复
Ray_hurricane
RayKwok_ 回复cxh1299543968: SystemService有没有实现SystemServiceImpl接口?
一年多之前 回复
cxh1299543968
KaisonChen 我该过来之后还是报同样的错误
一年多之前 回复

SystemServiceImpl是实现

 @Service("systemService")
public class SystemServiceImpl implements SystemService {

    @Override
    public String testService() {

        System.out.println("service test");

        return null;
    }
}
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Dubbo服务启动报错
最近在优化Dubbo项目过程中遇到了一下问题,在启动dubbo时报一下错误 Linux环境 + Dubbo 2.5.3 java.lang.IllegalArgumentException: Invalid registry store file /pub/.dubbo/dubbo-registry-224.5.6.7.cache, cause: Failed to create dire
springBoot整合activiti5.22启动报错
[code=java]rn2017-10-23 11:45:52,597 [restartedMain] DEBUG org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter - Application failed to start due to an exceptionrnorg.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.persistence.EntityManagerFactory' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1486) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]rnrnDescription:rnrnParameter 1 of method springProcessEngineConfiguration in org.activiti.spring.boot.JpaProcessEngineAutoConfiguration$JpaConfiguration required a bean of type 'javax.persistence.EntityManagerFactory' that could not be found.rnrnrnAction:rnrnConsider defining a bean of type 'javax.persistence.EntityManagerFactory' in your configuration.rn[/code]rnrnrnpom如下rn[code=text]rnrnrn 4.0.0rnrn com.hzysrn hzysrn 0.0.1-SNAPSHOTrn jarrnrn hzysrn Demo project for Spring Bootrnrn rn org.springframework.bootrn spring-boot-starter-parentrn 1.5.3.RELEASErn rn rnrn rn UTF-8rn UTF-8rn 1.8rn 1.3.2rn 5.22.0rn rnrn rn rn org.springframework.bootrn spring-boot-starter-webrn rn rn org.springframework.bootrn spring-boot-starter-aoprn rn rn org.springframework.bootrn spring-boot-starterrn rn rn rn org.springframework.bootrn spring-boot-starter-loggingrn rn rn rn rn rn org.springframework.bootrn spring-boot-starter-log4j2rn rn rnrn rn org.mybatis.spring.bootrn mybatis-spring-boot-starterrn 1.3.0rn rnrn rn com.oraclern ojdbc14rn 10.2.0.4.0rn rn rn rn mysqlrn mysql-connector-javarn 6.0.6rn rn rn rn com.alibabarn druidrn 1.1.1rn rnrn rn org.springframework.bootrn spring-boot-starter-testrn testrn rn rn com.alibabarn fastjsonrn 1.2.33rn rn rn org.apache.commonsrn commons-lang3rn 3.6rn rn rn commons-iorn commons-iorn 2.5rn rn rn commons-fileuploadrn commons-fileuploadrn 1.3.3rn rn rn net.sf.dozerrn dozerrn 5.5.1rn rnrn rn rn org.apache.shirorn shiro-corern $shiro.versionrn rn rn org.apache.shirorn shiro-webrn $shiro.versionrn rn rn org.apache.shirorn shiro-ehcachern $shiro.versionrn rn rn org.apache.shirorn shiro-springrn $shiro.versionrn rn rnrn rn javax.persistencern persistence-apirn 1.0.2rn rnrnrn rn io.springfoxrn springfox-swagger2rn 2.2.2rn rn rn io.springfoxrn springfox-swagger-uirn 2.2.2rn rnrn rn rn org.springframework.bootrn spring-boot-starter-thymeleafrn rn rn org.activitirn activiti-spring-boot-starter-basicrn $activiti.versionrn rn rn org.activitirn activiti-spring-boot-starter-actuatorrn $activiti.versionrn rn rn org.activitirn activiti-restrn $activiti.versionrn rnrn rn org.apache.xmlgraphicsrn batik-codecrn 1.7rn rn rn org.apache.xmlgraphicsrn batik-cssrn 1.7rn rn rn org.apache.xmlgraphicsrn batik-svg-domrn 1.7rn rn rn org.apache.xmlgraphicsrn batik-svggenrn 1.7rn rn rn org.activitirn activiti-explorerrn $activiti.versionrn rn rn org.activitirn activiti-diagram-restrn $activiti.versionrn rn rn org.activitirn activiti-simple-workflowrn $activiti.versionrn rn rn org.activitirn activiti-springrn $activiti.versionrn rn rnrn[/code]
springboot整合mybatis 启动报错
[code=text]rnjava.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.mybatis.spring.annotation.MapperScan.factoryBean()rn at java.lang.reflect.Method.getDefaultValue(Method.java:612) ~[na:1.8.0_131]rn at sun.reflect.annotation.AnnotationType.(AnnotationType.java:132) ~[na:1.8.0_131]rn at sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:85) ~[na:1.8.0_131]rn at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:266) ~[na:1.8.0_131]rn at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120) ~[na:1.8.0_131]rn at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72) ~[na:1.8.0_131]rn at java.lang.Class.createAnnotationData(Class.java:3521) ~[na:1.8.0_131]rn at java.lang.Class.annotationData(Class.java:3510) ~[na:1.8.0_131]rn at java.lang.Class.getAnnotations(Class.java:3446) ~[na:1.8.0_131]rn at org.springframework.core.type.StandardAnnotationMetadata.(StandardAnnotationMetadata.java:70) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]rn at org.springframework.beans.factory.annotation.AnnotatedGenericBeanDefinition.(AnnotatedGenericBeanDefinition.java:58) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]rn at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.doRegisterBean(AnnotatedBeanDefinitionReader.java:216) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]rn at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.registerBean(AnnotatedBeanDefinitionReader.java:145) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]rn at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.register(AnnotatedBeanDefinitionReader.java:135) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]rn at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:158) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:135) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:127) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at org.springframework.boot.SpringApplication.load(SpringApplication.java:704) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:393) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:328) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]rn at com.example.TestDemoApplication.main(TestDemoApplication.java:12) [classes/:na]rn[/code]rnspringboot版本 2.0.4.RELEASE mybatis版本 3.4.6 mybatis-spring版本 1.3.2
整合阿里dubbo服务的项目搭建实战(springboot)
“看看星空,会觉得自己很渺小,可能我们在宇宙中从来就是一个偶然。所以,无论什么事情,仔细想一想,都没有什么大不了的。这能帮助自己在遇到挫折时稳定心态,想得更开。”– 《腾讯传》 摘要: 原创出处:www.bysocket.com 泥瓦匠BYSocket 本文跟着我学习的脚步,进行一步一步的探索。 一、下载zookeeper服务注册管理器 下载ZooKeeper地址:
springboot整合dubbo
springboot 整合dubbo 供大家交流学习使用,一个小demo
SpringBoot整合Dubbo增强版
SpringBoot整合Dubbo 增强版,优化了maven update 后 resource源文件夹不显示的问题
Springboot整合Dubbo/ZooKeeper_demo
Springboot整合Dubbo/ZooKeeper_demo
Dubbo与SpringBoot整合
<p>rn <br />rn</p>rn<p>rn <p>rn 20周年限定一卡通!<span style="color:#337FE5;">可学Java全部课程</span>,仅售799元(原价7016元),<span style="color:#E53333;">还送漫威正版授权机械键盘+CSDN 20周年限量版T恤+智能编程助手!</span>rn </p>rn <p>rn 点此链接购买:rn </p>rn <table>rn <tbody>rn <tr>rn <td>rn <span style="color:#337FE5;"><a href="https://edu.csdn.net/topic/teachercard?utm_source=jsk20xqy" target="_blank">https://edu.csdn.net/topic/teachercard?utm_source=jsk20xqy</a><br />rn</span>rn </td>rn </tr>rn </tbody>rn </table>rn</p>rn<span>&nbsp;</span> rn<p>rn <br />rn</p>rn本阶段课程涵盖Java开发流行的自动化构建工具:Maven,版本控制系统:SVN和Git,容器虚拟化技术:Docker,权限模型:RBAC,集成测试:Jenkins,微服务架构:SpringCloud等核心内容。旨在应对各种实际开发情况下的的各种开发场景及业务的需要。
SpringBoot整合Dubbo微服务
SpringBoot整合Dubbo, 分3个模块: api提供接口; service提供服务; mobile消费服务.
Dubbo基础整合+Springboot
Dubbo基础整合文档,里面含有Springboot整合案例以及SpringMVC整合案列
springboot整合dubbo注解方式
工程结构: 主pom &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=...
SpringBoot整合Dubbo案例
SpringBoot整合Dubbo案例https://blog.csdn.net/u012081441/article/details/80696311
SpringBoot整合Dubbo、Zookeeper
SpringBoot整合Dubbo、Zookeeper,全注解,无xml配置文件
【全面】Springboot 整合 dubbo
dubbo的demo中,网上很多事把生产者与消费者建立在同一个项目,不同模块中的。而我是把它们分别建成不同的项目,其中生产者我采用springboot + dubbo 编写,而消费者采用spring +dubbo编写。   通常,我们会把服务的接口单独拿出来作为api服务,我这里的做法是单独建立一个工程,然后打成jar包,生产者以及消费者去引入这个jar包即可。 这是api的项目结构,里...
SpringBoot与Dubbo整合-项目搭建
&amp;#13; 本章节建立生产者和消费者来演示dubbo的demo&amp;#13; 生产者:springboot-dubbo-provider 和 消费者:springboot-dubbo-consumer 工程配置详解&amp;#13; Apache官方Demo:https://github.com/alibaba/dubbo-spring-boot-starter&amp;#13; 阿里巴巴官方D...
springboot 整合dubbo分布式框架
springboot 整合dubbo分布式框架 spring.dubbo.application.name=provider spring.dubbo.registry.address=zookeeper://127.0.0.1:2181 spring.dubbo.protocol.name=dubbo spring.dubbo.protocol.port=20880 spring.dubbo.scan=com.huang.dubbox
SpringBoot整合Dubbo
SpringBoot整合Dubbo,包括ZooKeeper,包括3个项目:1.传统的eclipse开发的点对点的Dubbo入门项目。2.加入注册中心ZooKeeper,dubbo和ZooKeeper整合。3使用SpringBoot整合Dubbo、ZooKeeper。内有详细文档,如有疑问,请咨询本人。
springboot整合dubbo(详细)
这两天参考各种资料在做springboot整合dubbo,这里记录下。 整个工程由dubbo-provider和dubbo-consumer两个模块构成,完整目录如下: 具体步骤: 1.使用IDEA创建一个空的MAVEN项目 填写GroupId和ArtifactId 项目创建完成后,删除src目录,在pom.xml中添加 &amp;lt;packaging&amp;gt;pom&amp;lt;/packaging&amp;g...
【四】Dubbo整合Springboot
Dubbo整合Springboot
springboot dubbo整合 demo
本示例是使用springboot(1.4.6.RELEASE)版本与dubbox整合的示例,项目采用为服务结构为基础,代码中包含client(基础包,包含各服务间接口及接口dto,作为其他服务的依赖包,不需要启动)、consumer(服务消费者)、provider(服务提供者)、consumerAndProvider(既有消费者又有提供者)四个模块,另外代码中不包含任何业务,仅仅是示例demo,如需在生产环境使用可根据自己需求稍作修改,谢谢
SpringBoot整合dubbo
Spring Boot 做的一个简单的增删改查,前台页面整合Thymeleaf模板,数据源druid,声明式事务,整合redis,并开启redis事务,整合ActiveMQ,整合dubbo
dubbo整合springboot
dubbo整合springboot
SpringBoot整合Dubbo项目
里面已有详细注释和使用方法,需要请自行下载即可,个人原创,不可用于商业目的
SpringBoot 整合 dubbo
一套基础的框架整合 适合刚开始学习dubbo 的新手 全注解配置
springboot整合dubbo,zookeeper
NULL 博文链接:https://1960370817.iteye.com/blog/2435208
springboot整合没有batis启动报错!
我用springboot整合mybatis启动时报错,数据库用的是mysql!rn这是我的yml配置文件:rnrn![图片说明](https://img-ask.csdn.net/upload/201907/08/1562549001_22080.png)rnrn![图片说明](https://img-ask.csdn.net/upload/201907/08/1562549042_774378.png)rnrn启动时报的错误:rnrn![图片说明](https://img-ask.csdn.net/upload/201907/08/1562549097_455256.png)rnrnrn之后我上网百度了一下,有人说是springboot的启动项里少加了一个(exclude=DataSourceAutoConfiguration.class)rnrn![图片说明](https://img-ask.csdn.net/upload/201907/08/1562549181_300854.png)rnrn加上之后再运行,就报如下错误了:rnrn![图片说明](https://img-ask.csdn.net/upload/201907/08/1562549250_447681.png)rnrn![图片说明](https://img-ask.csdn.net/upload/201907/08/1562549260_480467.png)rnrn有哪位大神可以为我解答一下?
springboot整合cxf框架启动报错
异常信息: *************************** APPLICATION FAILED TO START *************************** Description: Parameter 1 of constructor in org.springframework.boot.autoconfigure.web.servlet.error.ErrorMv...
SpringBoot整合redis启动报错'org.springframework.data.redis.connection.RedisConnectionF
rnSpringBoot版本为1.5.7rnPom.xml:[code=java]rn rn org.springframework.bootrn spring-boot-starter-webrn rn rn rn org.springframework.bootrn spring-boot-starter-data-jparn rn rn rn mysqlrn mysql-connector-javarn runtimern rn rn rn redis.clientsrn jedisrn rn rn org.springframework.bootrn spring-boot-starter-data-redisrn rn rn org.apache.commonsrn commons-pool2rn [/code]rnrnRedisConfig:rn[code=java]@Autowiredrn private RedisConnectionFactory redisConnectionFactory;rn rn /**rn * 默认情况下bean的名称和方法名称相同,你也可以使用name属性来指定。rn * IOC容器中注册了ID为 redisTemplate的 bean。rn * @returnrn */rn @Beanrn public RedisTemplate redisTemplate()rn StringRedisTemplate redisTemplate = new StringRedisTemplate(redisConnectionFactory);rn return redisTemplate;rn [/code]
springboot整合es启动报错的问题
今天打算用springboot整合es创建一个索引并往索引里面写数据的时候,项目启动的时候一直报下面的这个错误,错误大概如下, Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.elasticsearch.client.transport.TransportClie...
springboot整合pagehelper的时候启动报错
springboot启动报错 Caused by: java.lang.NoClassDefFoundError: Lorg/springframework/boot/bind/RelaxedPropertyResolver; at java.lang.Class.getDeclaredFields0(Native Method) ~[na:1.8.0_144] at java.lang.C...
springboot整合activit第二次启动报错
springboot第一次启动的时候可以正常创建表,第二次启动就开始报错。表已经存在,求解。rnrnrnrn2018-04-03 14:06:08.230 INFO 8284 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.11rn2018-04-03 14:06:08.391 INFO 8284 --- [ost-startStop-1] o.a.c.c.C.[.[localhost].[/attence] : Initializing Spring embedded WebApplicationContextrn2018-04-03 14:06:13.482 INFO 8284 --- [ main] com.alibaba.druid.pool.DruidDataSource : dataSource-1 initedrn2018-04-03 14:06:13.495 INFO 8284 --- [ main] o.activiti.engine.impl.db.DbSqlSession : performing create on engine with resource org/activiti/db/create/activiti.mysql.create.engine.sqlrn2018-04-03 14:06:13.497 INFO 8284 --- [ main] o.activiti.engine.impl.db.DbSqlSession : Found MySQL: majorVersion=5 minorVersion=5rn2018-04-03 14:06:13.630 ERROR 8284 --- [ main] druid.sql.Statement : conn-10001, stmt-20000 execute error. create table ACT_GE_PROPERTY ( rnNAME_ varchar(64), rnVALUE_ varchar(300), rnREV_ integer, rnprimary key (NAME_) rn) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
springboot整合dubbo加上事务注解启动报错的问题
springboot整合dubbo加上事务注解启动报错的问题 如果使用以下方式 在其实现类中加入了事务注解 @Reference(version = &quot;1.0.0&quot;, timeout = 30000) private ShopService shopService; @Service(version = &quot;1.0.0&quot;) public class OrderFoodServic...
Dubbo启动报错
异常关键字: ERROR com.alibaba.dubbo.remoting.transport.AbstractClient - [DUBBO] Failed to start NettyClient com.alibaba.dubbo.remoting.RemotingException: client at com.alibaba.dubbo.remoting.transport.n...
dubbo的入门学习(三)springboot整合dubbo
dubbo的入门学习(三)springboot整合dubbo 主要内容以及实现的功能和上一篇博客类似,只是以springboot的配置来实现完成用户信息的获取。 可查看上一篇博客了解功能需求。 https://blog.csdn.net/qq_36654629/article/details/90052908 现在说一下整合的思想,这里一样是分别创建三个springboot工程 gmall-in...
dubbo: 做一个springboot整合dubbo demo(艰难)
一:前话 我可能大概估计花了N个小时来跑一个springboot-dubbo demo,网上的demo依赖版本千奇百怪,各种跑不通,各种版本不兼容,差点要死在制作demo的路上,想想还有爬起来继续撸教程,终于皇天不负有心人,撸通了一个demo。 项目地址 :springboot-dubbo-demo项目地址 在撸通一个demo之后,我看一下,demo中所需要的jar 一个springboot整合...
三、dubbo与springboot整合,dubbo的常用配置
一、导入dubbo的starter,主要版本要求 我这里使用的是 2.1.3 &lt;dependency&gt; &lt;groupId&gt;com.alibaba.boot&lt;/groupId&gt; &lt;artifactId&gt;dubbo-spring-boot-starter&lt;/artifactId&gt; &lt;version&gt;0....
dubbo启动报错
首先说明我的环境 两台电脑都是windows 环境 dubbo服务提供者一台电脑 zookeeper 是在另一台电脑启动,两台电脑都在局域网内,防火墙都已经关闭,如果两者部署在通一台电脑是没有问题的,下面是详细的报错信息:rn2016-08-06 16:18:09 [localhost-startStop-1] ERROR o.s.web.context.ContextLoader - Context initialization failedrncom.alibaba.dubbo.rpc.RpcException: Fail to start server(url: dubbo://192.168.1.113:20881/com。。。8769) Failed to bind NettyServer on /192.168.1.113:20881, cause: Failed to bind to: /192.168.1.113:20881rn at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:289)rn at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.openServer(DubboProtocol.java:266)rn at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.export(DubboProtocol.java:253)rn at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:55)rn at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:56)rn at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java)rn at com.alibaba.dubbo.registry.integration.RegistryProtocol.doLocalExport(RegistryProtocol.java:153)rn at com.alibaba.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:107)rn at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:53)rn at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:54)rn at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java)rn at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:485)rn at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:281)rn at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:242)rn at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:143)rn at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:109)rn at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)rn at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)rn at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:954)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)rn at java.util.concurrent.FutureTask.run(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)rn at java.lang.Thread.run(Unknown Source)rnCaused by: com.alibaba.dubbo.remoting.RemotingException: Failed to bind NettyServer on /192.168.1.113:20881, cause: Failed to bind to: /192.168.1.113:20881rn at com.alibaba.dubbo.remoting.transport.AbstractServer.(AbstractServer.java:72)rn at com.alibaba.dubbo.remoting.transport.netty.NettyServer.(NettyServer.java:63)rn at com.alibaba.dubbo.remoting.transport.netty.NettyTransporter.bind(NettyTransporter.java:33)rn at com.alibaba.dubbo.remoting.Transporter$Adpative.bind(Transporter$Adpative.java)rn at com.alibaba.dubbo.remoting.Transporters.bind(Transporters.java:48)rn at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchanger.bind(HeaderExchanger.java:41)rn at com.alibaba.dubbo.remoting.exchange.Exchangers.bind(Exchangers.java:63)rn at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:287)rn ... 31 common frames omittedrnCaused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /192.168.1.113:20881rn at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)rn at com.alibaba.dubbo.remoting.transport.netty.NettyServer.doOpen(NettyServer.java:94)rn at com.alibaba.dubbo.remoting.transport.AbstractServer.(AbstractServer.java:67)rn ... 38 common frames omittedrnCaused by: java.net.BindException: Cannot assign requested address: bindrn at sun.nio.ch.Net.bind0(Native Method)rn at sun.nio.ch.Net.bind(Unknown Source)rn at sun.nio.ch.Net.bind(Unknown Source)rn at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)rn at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)rn at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)rn at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:366)rn at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:290)rn at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)rn ... 3 common frames omittedrn八月 06, 2016 4:18:09 下午 org.apache.catalina.core.StandardContext listenerStartrn严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrncom.alibaba.dubbo.rpc.RpcException: Fail to start server(url: dubbo://192.168.1.113:20881/com.。。。8769) Failed to bind NettyServer on /192.168.1.113:20881, cause: Failed to bind to: /192.168.1.113:20881rn at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:289)rn at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.openServer(DubboProtocol.java:266)rn at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.export(DubboProtocol.java:253)rn at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:55)rn at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:56)rn at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java)rn at com.alibaba.dubbo.registry.integration.RegistryProtocol.doLocalExport(RegistryProtocol.java:153)rn at com.alibaba.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:107)rn at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:53)rn at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:54)rn at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java)rn at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:485)rn at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:281)rn at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:242)rn at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:143)rn at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:109)rn at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)rn at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)rn at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:954)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:41rn
Dubbo与SpringBoot的三种整合方式
该案例使用application.yml 的方式、xml方式和API三种方式完成了对Dubbo应用的整合
springboot整合dubbo实例demo
springboot整合了dubbo,使用zookeeper做为注册中心。
springboot整合dubbo(xml形式)
dubbo是一个远程服务调用的分布式框架。让我们告别了webservice的wsdl调用方式,取而代之的是服务注册和服务消费模式。下面对dubbo的组成做一个简单的解释,为的是读者能更好的理解下面的代码 dubbo在结构上一共分为4个部分。 1 .provider:服务的提供者,将服务注册到Registry中,供外界调用。 2 .container:服务容器 ( 加载dubbo配置文件,将配置文件...
相关热词 c# stream 复制 android c# c#监测窗口句柄 c# md5 引用 c# 判断tabtip 自己写个浏览器程序c# c# 字符串变成整数数组 c#语言编程写出一个方法 c# 转盘抽奖 c#选中treeview