renren-fast加入服务注册发现时的错误

这个bug如何是好

2021-03-25 21:48:53.086  INFO 6124 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$7b560c47] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
====================================================================================================================

                    欢迎使用 renren-fast 人人快速开发平台 - Powered By https://www.renren.io/

====================================================================================================================
2021-03-25 21:48:55.347  INFO 6124 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Loading nacos data, dataId: 'renren-fast.properties', group: 'DEFAULT_GROUP'
2021-03-25 21:48:55.353  INFO 6124 --- [           main] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource {name='NACOS', propertySources=[NacosPropertySource {name='renren-fast-dev.properties'}, NacosPropertySource {name='renren-fast.properties'}]}
2021-03-25 21:48:55.358  INFO 6124 --- [           main] io.renren.RenrenApplication              : The following profiles are active: dev
2021-03-25 21:48:56.196  WARN 6124 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [io.renren.RenrenApplication]; nested exception is java.lang.IllegalArgumentException: Could not find class [org.springframework.cloud.client.loadbalancer.reactive.OnNoRibbonDefaultCondition]
2021-03-25 21:48:56.203  INFO 6124 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-03-25 21:48:56.207 ERROR 6124 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [io.renren.RenrenApplication]; nested exception is java.lang.IllegalArgumentException: Could not find class [org.springframework.cloud.client.loadbalancer.reactive.OnNoRibbonDefaultCondition]
	at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:597) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassParser.access$900(ConfigurationClassParser.java:109) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.lambda$processGroupImports$1(ConfigurationClassParser.java:805) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at java.util.ArrayList.forEach(ArrayList.java:1249) ~[na:1.8.0_60]
	at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:801) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:771) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:188) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:319) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
	at io.renren.RenrenApplication.main(RenrenApplication.java:20) [classes/:na]
Caused by: java.lang.IllegalArgumentException: Could not find class [org.springframework.cloud.client.loadbalancer.reactive.OnNoRibbonDefaultCondition]
	at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:332) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConditionEvaluator.getCondition(ConditionEvaluator.java:124) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:96) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:221) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassParser.processMemberClasses(ConfigurationClassParser.java:364) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:266) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:587) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	... 19 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.cloud.client.loadbalancer.reactive.OnNoRibbonDefaultCondition
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_60]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_60]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_60]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_60]
	at java.lang.Class.forName0(Native Method) ~[na:1.8.0_60]
	at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_60]
	at org.springframework.util.ClassUtils.forName(ClassUtils.java:282) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:322) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	... 26 common frames omitted


Process finished with exit code 1

解决

应该是因为springcloud的版本不对
将之前导入的common模块取消
导入对应版本的注册发现功能依赖
<dependency>
	<groupId>com.alibaba.boot</groupId>
	<artifactId>nacos-config-spring-boot-starter</artifactId>
	<version>0.2.2</version>
</dependency>
<dependency>
	<groupId>org.springframework.cloud</groupId>
	<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
	<version>0.9.0.RELEASE</version>
</dependency>

<!--<dependency>
	<groupId>com.jane.shop</groupId>
	<artifactId>common</artifactId>
	<version>0.0.1-SNAPSHOT</version>
</dependency>-->
  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ReflectMirroring

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值