druid-spring-boot-starter 是否支持Spring boot2.0呢

cgvd09ve  于 2023-02-04  发布在  Druid
关注(0)|答案(7)|浏览(306)
java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$PooledDataSourceConfiguration
	at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:64) ~[spring-boot-autoconfigure-2.0.0.M4.jar:2.0.0.M4]
	at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:109) ~[spring-context-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader$TrackedConditionEvaluator.shouldSkip(ConfigurationClassBeanDefinitionReader.java:443) ~[spring-context-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader$TrackedConditionEvaluator.shouldSkip(ConfigurationClassBeanDefinitionReader.java:432) ~[spring-context-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:128) ~[spring-context-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:117) ~[spring-context-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:328) ~[spring-context-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:233) ~[spring-context-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:271) ~[spring-context-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94) ~[spring-context-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:693) ~[spring-context-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531) ~[spring-context-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) [spring-boot-2.0.0.M4.jar:2.0.0.M4]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386) [spring-boot-2.0.0.M4.jar:2.0.0.M4]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.0.M4.jar:2.0.0.M4]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245) [spring-boot-2.0.0.M4.jar:2.0.0.M4]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233) [spring-boot-2.0.0.M4.jar:2.0.0.M4]
	at com.hujiang.career.databank.spider.SpiderApplication.main(SpiderApplication.java:16) [classes/:na]
Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
	at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:659) ~[spring-core-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:556) ~[spring-core-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:541) ~[spring-core-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:599) ~[spring-core-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:727) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:669) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:637) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1489) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1007) ~[spring-beans-5.0.0.RC4.jar:5.0.0.RC4]
	at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.addBeanTypeForNonAliasDefinition(BeanTypeRegistry.java:168) ~[spring-boot-autoconfigure-2.0.0.M4.jar:2.0.0.M4]
	at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.addBeanType(BeanTypeRegistry.java:157) ~[spring-boot-autoconfigure-2.0.0.M4.jar:2.0.0.M4]
	at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.updateTypesIfNecessary(BeanTypeRegistry.java:207) ~[spring-boot-autoconfigure-2.0.0.M4.jar:2.0.0.M4]
	at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.getNamesForType(BeanTypeRegistry.java:114) ~[spring-boot-autoconfigure-2.0.0.M4.jar:2.0.0.M4]
	at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:265) ~[spring-boot-autoconfigure-2.0.0.M4.jar:2.0.0.M4]
	at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:254) ~[spring-boot-autoconfigure-2.0.0.M4.jar:2.0.0.M4]
	at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:196) ~[spring-boot-autoconfigure-2.0.0.M4.jar:2.0.0.M4]
	at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:115) ~[spring-boot-autoconfigure-2.0.0.M4.jar:2.0.0.M4]
	at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-2.0.0.M4.jar:2.0.0.M4]
	... 17 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/autoconfigure/jdbc/metadata/DataSourcePoolMetadataProvider
	at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_144]
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[na:1.8.0_144]
	at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[na:1.8.0_144]
	at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:641) ~[spring-core-5.0.0.RC4.jar:5.0.0.RC4]
	... 34 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.autoconfigure.jdbc.metadata.DataSourcePoolMetadataProvider
	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]
	... 38 common frames omitted
<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.0.M4</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
            <version>1.1.3</version>
        </dependency>
qf9go6mv

qf9go6mv2#

等Spring Boot 2.0正式版发布后会支持的,现在正式版还没出变动比较频繁。

sy5wg1nm

sy5wg1nm3#

我也遇到了此问题,RC 已经出来了,基本不会变动了。

332nm8kg

332nm8kg4#

@lihengming 目前是否有解决方案?求问

utugiqy6

utugiqy65#

各位不好意思,改用新版本,升级sdk版本已解决,谢谢各位

ufj5ltwl

ufj5ltwl6#

新版本提了个醒 升级1.1.10. 解决了这个问题 感谢啊 兄嘚

vlurs2pr

vlurs2pr7#

1.1.14 好像又遇到了这个问题。

相关问题