解决:Error processing condition on org.springframework.cloud.commons.httpclient.HttpClientConfigur....

编程入门 行业动态 更新时间:2024-10-09 20:29:15

解决:Error processing <a href=https://www.elefans.com/category/jswz/34/1760658.html style=condition on org.springframework.cloud.commons.httpclient.HttpClientConfigur...."/>

解决:Error processing condition on org.springframework.cloud.commons.httpclient.HttpClientConfigur....

出现如下错误

Error processing condition on org.springframework.cloudmons.httpclient.HttpClientConfiguration$ApacheHttpClientConfiguration.apacheHttpClientBuilder
2022-04-01 10:52:49.774  INFO 8492 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying).   ____          _            __ _ _/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \\\/  ___)| |_)| | | | | || (_| |  ) ) ) )'  |____| .__|_| |_|_| |_\__, | / / / /=========|_|==============|___/=/_/_/_/:: Spring Boot ::        (v2.2.0.RELEASE)2022-04-01 10:52:51.357  INFO 8492 --- [           main] com.heima.App                            : No active profile set, falling back to default profiles: default
2022-04-01 10:52:51.638 ERROR 8492 --- [           main] o.s.boot.SpringApplication               : Application run failedjava.lang.IllegalStateException: Error processing condition on org.springframework.cloudmons.httpclient.HttpClientConfiguration$ApacheHttpClientConfiguration.apacheHttpClientBuilderat org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60) ~[spring-boot-autoconfigure-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:184) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:144) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:120) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:337) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:242) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]at com.heima.App.main(App.java:11) [classes/:na]
Caused by: java.lang.IllegalStateException: @ConditionalOnMissingBean did not specify a bean using type, name or annotation and the attempt to deduce the bean's type failedat org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.validate(OnBeanCondition.java:479) ~[spring-boot-autoconfigure-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.<init>(OnBeanCondition.java:428) ~[spring-boot-autoconfigure-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:140) ~[spring-boot-autoconfigure-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-2.2.0.RELEASE.jar:2.2.0.RELEASE]... 17 common frames omitted
Caused by: org.springframework.boot.autoconfigure.condition.OnBeanCondition$BeanTypeDeductionException: Failed to deduce bean type for org.springframework.cloudmons.httpclient.HttpClientConfiguration$ApacheHttpClientConfiguration.apacheHttpClientBuilderat org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.deducedBeanTypeForBeanMethod(OnBeanCondition.java:509) ~[spring-boot-autoconfigure-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.deducedBeanType(OnBeanCondition.java:498) ~[spring-boot-autoconfigure-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.<init>(OnBeanCondition.java:421) ~[spring-boot-autoconfigure-2.2.0.RELEASE.jar:2.2.0.RELEASE]... 19 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.apache.http.impl.client.HttpClientBuilderat java.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_45]at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_45]at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_45]at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_45]at org.springframework.boot.autoconfigure.condition.FilteringSpringBootCondition.resolve(FilteringSpringBootCondition.java:108) ~[spring-boot-autoconfigure-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.getReturnType(OnBeanCondition.java:517) ~[spring-boot-autoconfigure-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.deducedBeanTypeForBeanMethod(OnBeanCondition.java:505) ~[spring-boot-autoconfigure-2.2.0.RELEASE.jar:2.2.0.RELEASE]... 21 common frames omitted2022-04-01 10:52:51.647  WARN 8492 --- [           main] o.s.boot.SpringApplication               : Unable to close ApplicationContextjava.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloudmons.httpclient.HttpClientConfiguration$ApacheHttpClientConfiguration] from ClassLoader [sun.misc.Launcher$AppClassLoader@14dad5dc]at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:477) ~[spring-core-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:355) ~[spring-core-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:411) ~[spring-core-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$2(AbstractAutowireCapableBeanFactory.java:743) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$$Lambda$196/1250442005.apply(Unknown Source) ~[na:na]at java.util.concurrent.ConcurrentHashMapputeIfAbsent(ConcurrentHashMap.java:1688) ~[na:1.8.0_45]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:742) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:681) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:649) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1605) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:520) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:491) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:613) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:605) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1242) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]at org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:869) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:857) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:844) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:795) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:325) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]at com.heima.App.main(App.java:11) [classes/:na]
Caused by: java.lang.NoClassDefFoundError: org/apache/http/impl/client/HttpClientBuilderat java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_45]at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[na:1.8.0_45]at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[na:1.8.0_45]at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:459) ~[spring-core-5.2.0.RELEASE.jar:5.2.0.RELEASE]... 22 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.apache.http.impl.client.HttpClientBuilderat java.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_45]at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_45]at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_45]at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_45]... 26 common frames omittedProcess finished with exit code 1

解决方法,添加如下依赖

<dependency><groupId>org.apache.httpcomponents</groupId><artifactId>httpclient</artifactId><version>4.5.3</version>
</dependency>



喜欢就要争取,不行就要努力。

更多推荐

解决:Error processing condition on org.springframework.cloud.commons.httpclient.Ht

本文发布于:2024-02-13 22:47:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1760872.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:condition   org   Error   processing   springframework

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!