SpringBoot整合阿里巴巴连接池druid(德鲁伊)报错
错误信息如下:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘dataSource’: Unsatisfied dependency expressed through field ‘basicProperties’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties’: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseType
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
A
u
t
o
w
i
r
e
d
F
i
e
l
d
E
l
e
m
e
n
t
.
i
n
j
e
c
t
(
A
u
t
o
w
i
r
e
d
A
n
n
o
t
a
t
i
o
n
B
e
a
n
P
o
s
t
P
r
o
c
e
s
s
o
r
.
j
a
v
a
:
598
)
[
s
p
r
i
n
g
−
b
e
a
n
s
−
5.1.17.
R
E
L
E
A
S
E
.
j
a
r
:
5.1.17.
R
E
L
E
A
S
E
]
a
t
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
a
n
s
.
f
a
c
t
o
r
y
.
a
n
n
o
t
a
t
i
o
n
.
I
n
j
e
c
t
i
o
n
M
e
t
a
d
a
t
a
.
i
n
j
e
c
t
(
I
n
j
e
c
t
i
o
n
M
e
t
a
d
a
t
a
.
j
a
v
a
:
90
)
[
s
p
r
i
n
g
−
b
e
a
n
s
−
5.1.17.
R
E
L
E
A
S
E
.
j
a
r
:
5.1.17.
R
E
L
E
A
S
E
]
a
t
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
a
n
s
.
f
a
c
t
o
r
y
.
a
n
n
o
t
a
t
i
o
n
.
A
u
t
o
w
i
r
e
d
A
n
n
o
t
a
t
i
o
n
B
e
a
n
P
o
s
t
P
r
o
c
e
s
s
o
r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u
t
o
w
i
r
e
C
a
p
a
b
l
e
B
e
a
n
F
a
c
t
o
r
y
.
c
r
e
a
t
e
B
e
a
n
(
A
b
s
t
r
a
c
t
A
u
t
o
w
i
r
e
C
a
p
a
b
l
e
B
e
a
n
F
a
c
t
o
r
y
.
j
a
v
a
:
514
)
[
s
p
r
i
n
g
−
b
e
a
n
s
−
5.1.17.
R
E
L
E
A
S
E
.
j
a
r
:
5.1.17.
R
E
L
E
A
S
E
]
a
t
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
a
n
s
.
f
a
c
t
o
r
y
.
s
u
p
p
o
r
t
.
A
b
s
t
r
a
c
t
B
e
a
n
F
a
c
t
o
r
y
.
l
a
m
b
d
a
AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:598) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:376) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1402) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:591) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:514) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda
AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:598) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:376) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1402) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:591) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:514) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.lambdadoGetBean
0
(
A
b
s
t
r
a
c
t
B
e
a
n
F
a
c
t
o
r
y
.
j
a
v
a
:
321
)
[
s
p
r
i
n
g
−
b
e
a
n
s
−
5.1.17.
R
E
L
E
A
S
E
.
j
a
r
:
5.1.17.
R
E
L
E
A
S
E
]
a
t
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
a
n
s
.
f
a
c
t
o
r
y
.
s
u
p
p
o
r
t
.
D
e
f
a
u
l
t
S
i
n
g
l
e
t
o
n
B
e
a
n
R
e
g
i
s
t
r
y
.
g
e
t
S
i
n
g
l
e
t
o
n
(
D
e
f
a
u
l
t
S
i
n
g
l
e
t
o
n
B
e
a
n
R
e
g
i
s
t
r
y
.
j
a
v
a
:
226
)
[
s
p
r
i
n
g
−
b
e
a
n
s
−
5.1.17.
R
E
L
E
A
S
E
.
j
a
r
:
5.1.17.
R
E
L
E
A
S
E
]
a
t
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
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a
p
a
b
l
e
B
e
a
n
F
a
c
t
o
r
y
.
j
a
v
a
:
554
)
[
s
p
r
i
n
g
−
b
e
a
n
s
−
5.1.17.
R
E
L
E
A
S
E
.
j
a
r
:
5.1.17.
R
E
L
E
A
S
E
]
a
t
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
a
n
s
.
f
a
c
t
o
r
y
.
s
u
p
p
o
r
t
.
A
b
s
t
r
a
c
t
A
u
t
o
w
i
r
e
C
a
p
a
b
l
e
B
e
a
n
F
a
c
t
o
r
y
.
c
r
e
a
t
e
B
e
a
n
(
A
b
s
t
r
a
c
t
A
u
t
o
w
i
r
e
C
a
p
a
b
l
e
B
e
a
n
F
a
c
t
o
r
y
.
j
a
v
a
:
514
)
[
s
p
r
i
n
g
−
b
e
a
n
s
−
5.1.17.
R
E
L
E
A
S
E
.
j
a
r
:
5.1.17.
R
E
L
E
A
S
E
]
a
t
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
a
n
s
.
f
a
c
t
o
r
y
.
s
u
p
p
o
r
t
.
A
b
s
t
r
a
c
t
B
e
a
n
F
a
c
t
o
r
y
.
l
a
m
b
d
a
0(AbstractBeanFactory.java:321) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:319) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:863) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[spring-context-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.1.16.RELEASE.jar:2.1.16.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) [spring-boot-2.1.16.RELEASE.jar:2.1.16.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) [spring-boot-2.1.16.RELEASE.jar:2.1.16.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.16.RELEASE.jar:2.1.16.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.1.16.RELEASE.jar:2.1.16.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204) [spring-boot-2.1.16.RELEASE.jar:2.1.16.RELEASE] at com.king.shiro.TestShiroApplication.main(TestShiroApplication.java:10) [classes/:na] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseType at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1300) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:554) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:514) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda
0(AbstractBeanFactory.java:321) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:319) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:863) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) [spring−context−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) [spring−context−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) [spring−boot−2.1.16.RELEASE.jar:2.1.16.RELEASE]atorg.springframework.boot.SpringApplication.refresh(SpringApplication.java:744)[spring−boot−2.1.16.RELEASE.jar:2.1.16.RELEASE]atorg.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391)[spring−boot−2.1.16.RELEASE.jar:2.1.16.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:312)[spring−boot−2.1.16.RELEASE.jar:2.1.16.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1215)[spring−boot−2.1.16.RELEASE.jar:2.1.16.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1204)[spring−boot−2.1.16.RELEASE.jar:2.1.16.RELEASE]atcom.king.shiro.TestShiroApplication.main(TestShiroApplication.java:10)[classes/:na]Causedby:org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname′spring.datasource−org.springframework.boot.autoconfigure.jdbc.DataSourceProperties′:Instantiationofbeanfailed;nestedexceptionisorg.springframework.beans.BeanInstantiationException:Failedtoinstantiate[org.springframework.boot.autoconfigure.jdbc.DataSourceProperties]:Constructorthrewexception;nestedexceptionisjava.lang.NoClassDefFoundError:org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseTypeatorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1300) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:554) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:514) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.lambdadoGetBean
0
(
A
b
s
t
r
a
c
t
B
e
a
n
F
a
c
t
o
r
y
.
j
a
v
a
:
321
)
[
s
p
r
i
n
g
−
b
e
a
n
s
−
5.1.17.
R
E
L
E
A
S
E
.
j
a
r
:
5.1.17.
R
E
L
E
A
S
E
]
a
t
o
r
g
.
s
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.17.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:319) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1273) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1193) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
0(AbstractBeanFactory.java:321) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:319) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1273) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1193) [spring−beans−5.1.17.RELEASE.jar:5.1.17.RELEASE]atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:595) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE]
… 19 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseType
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:184) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1292) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE]
… 30 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseType
at org.springframework.boot.jdbc.EmbeddedDatabaseConnection.(EmbeddedDatabaseConnection.java:51) ~[spring-boot-2.1.16.RELEASE.jar:2.1.16.RELEASE]
at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.(DataSourceProperties.java:152) ~[spring-boot-autoconfigure-2.1.16.RELEASE.jar:2.1.16.RELEASE]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_161]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_161]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_161]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_161]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:172) ~[spring-beans-5.1.17.RELEASE.jar:5.1.17.RELEASE]
… 32 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_161]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_161]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) ~[na:1.8.0_161]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_161]
… 39 common frames omitted
解决办法如下:
在 pom.xml文件引入依赖:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</dependency>