Caused by: org.springframework.beans.BeanInstantiationException Create breakpoint : Failed toinstant

org.springframework.beans.factory.BeancreationException Create breakpoint : Error creating bean with’automaticConstruct’: Injection of resource dependencies failed; nested exception isnameorg.

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

.

B

e

a

n

C

r

e

a

t

i

o

n

E

x

c

e

p

t

i

o

n

:

E

r

r

o

r

c

r

e

a

t

i

n

g

b

e

a

n

w

i

t

h

n

a

m

e

t

a

b

l

e

M

a

p

p

e

r

d

e

f

i

n

e

d

i

n

U

R

L

[

j

a

r

:

f

i

l

e

:

/

c

:

/

a

p

a

c

h

e

?

m

a

v

e

n

?

3.61

/

r

e

s

p

/

c

o

m

/

c

m

o

s

/

m

t

p

?

c

o

m

m

o

n

/

m

t

p

?

c

l

o

u

d

?

0.1

/

m

t

p

?

c

o

m

m

o

n

?

m

t

p

?

c

l

o

u

d

?

0.1

j

a

r

!

/

c

o

m

/

m

t

p

/

m

a

p

p

e

r

/

T

a

b

l

e

M

a

p

p

e

r

.

c

l

a

s

s

]

:

C

a

n

n

o

t

r

e

s

o

l

v

e

r

e

f

e

r

e

n

c

e

t

o

b

e

a

n

s

q

l

s

e

s

s

i

o

n

T

e

m

p

l

a

t

e

w

h

i

l

e

s

e

t

t

i

n

g

b

e

a

n

p

r

o

p

e

r

t

y

s

q

l

s

e

s

s

i

o

n

T

e

m

p

l

a

t

e

;

n

e

s

t

e

d

e

x

c

e

p

t

i

o

n

i

s

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

.

U

n

s

a

t

i

s

f

i

e

d

D

e

p

e

n

d

e

n

c

y

E

x

c

e

p

t

i

o

n

:

E

r

r

o

r

c

r

e

a

t

i

n

g

b

e

a

n

w

i

t

h

n

a

m

e

d

a

t

a

S

o

u

r

c

e

S

c

r

i

p

t

D

a

t

a

b

a

s

e

I

n

i

t

i

a

l

i

z

e

r

d

e

f

i

n

e

d

i

n

c

l

a

s

s

p

a

t

h

r

e

s

o

u

r

c

e

[

o

r

g

/

s

p

r

i

n

g

f

r

a

m

e

w

o

r

k

/

b

o

o

t

/

a

u

t

o

c

o

n

f

i

g

u

r

e

/

s

q

l

/

i

n

i

t

/

D

a

t

a

S

o

u

r

c

e

I

n

i

t

i

a

l

i

z

a

t

i

o

n

c

o

n

f

i

g

u

r

a

t

i

o

n

.

c

l

a

s

s

]

:

U

n

s

a

t

i

s

f

i

e

d

d

e

p

e

n

d

e

n

c

y

e

x

p

r

e

s

s

e

d

t

h

r

o

u

g

h

m

e

t

h

o

d

d

a

t

a

S

o

u

r

c

e

S

c

r

i

p

t

D

a

t

a

b

a

s

e

I

n

i

t

i

a

l

i

z

e

r

p

a

r

a

m

e

t

e

l

0

;

n

e

s

t

e

d

e

x

c

e

p

t

i

o

n

i

s

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

,

B

e

a

n

C

r

e

a

t

i

o

n

E

x

c

e

p

t

i

o

n

:

E

r

r

o

r

c

r

e

a

t

i

n

g

b

e

a

n

w

i

t

h

n

a

m

e

d

a

t

a

S

o

u

r

c

e

d

e

f

i

n

e

d

i

n

c

l

a

s

s

p

a

t

h

r

e

s

o

u

r

c

e

o

r

g

/

s

p

r

i

n

g

f

r

a

m

e

w

o

r

k

/

b

o

o

t

/

a

u

t

o

c

o

n

f

i

q

u

r

e

/

i

d

b

c

/

D

a

t

a

S

o

u

r

c

e

c

o

n

f

i

q

u

r

a

t

i

o

n

pringframework.beans.factory.BeanCreationException: Error creating bean with nametableMapper' defined in URL [jar:file:/c:/apache-maven-3.61/resp/com/cmos/mtp-common/mtp-cloud-0.1/mtp-common-mtp-cloud-0.1jar!/com/mtp/mapper/TableMapper.class]: Cannot resolve reference to bean 'sqlsessionTemplatewhile setting bean property 'sqlsessionTemplate'; nested exception is org.springframework.beansfactory.UnsatisfiedDependencyException: Error creating bean with namedataSourceScriptDatabaseInitializer' defined in class path resource[org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationconfiguration.class]:Unsatisfied dependency expressed through method 'dataSourceScriptDatabaseInitializer' parametel0; nested exception is org.springframework.beans.factory,BeanCreationException: Error creatingbean with name 'dataSource' defined in class path resourceorg/springframework/boot/autoconfiqure/idbc/DataSourceconfiquration

pringframework.beans.factory.BeanCreationException:ErrorcreatingbeanwithnametableMapper′definedinURL[jar:file:/c:/apache?maven?3.61/resp/com/cmos/mtp?common/mtp?cloud?0.1/mtp?common?mtp?cloud?0.1jar!/com/mtp/mapper/TableMapper.class]:Cannotresolvereferencetobean′sqlsessionTemplatewhilesettingbeanproperty′sqlsessionTemplate′;nestedexceptionisorg.springframework.beansfactory.UnsatisfiedDependencyException:ErrorcreatingbeanwithnamedataSourceScriptDatabaseInitializer′definedinclasspathresource[org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationconfiguration.class]:Unsatisfieddependencyexpressedthroughmethod′dataSourceScriptDatabaseInitializer′parametel0;nestedexceptionisorg.springframework.beans.factory,BeanCreationException:Errorcreatingbeanwithname′dataSource′definedinclasspathresourceorg/springframework/boot/autoconfiqure/idbc/DataSourceconfiqurationGeneric.class : Beaninstantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory methoddataSource’threwexception:nestedexception is iava.lang.BootstrapMethodError: iava.lang
在这里插入图片描述

Caused by: org.springframework.beans.BeanInstantiationException Create breakpoint : Failed toinstantiate [javax.sql.DataSource]: Factory method ‘dataSource’ threw exception; nestedexception is java.lang.BootstrapMethodError: java.lang.NoclassDefFoundError:com/mchange/v2/c3p0/AbstractComboPooledDataSource
在这里插入图片描述
错误原因,定时任务jar包问题
原jar包:

<dependency>
    <groupId>org.quartz-scheduler</groupId>
    <artifactId>quartz</artifactId>
    <version>2.2.1</version>
</dependency>

改之后

<!-- https://mvnrepository.com/artifact/org.quartz-scheduler/quartz -->
<dependency>
    <groupId>org.quartz-scheduler</groupId>
    <artifactId>quartz</artifactId>
    <version>2.3.2</version>
</dependency>