springboot配置mybatis 启动报错
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘oneLinkOfferingAsyncService’: Unsatisfied dependency expressed through field ‘orderMapper’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘orderOfferingMapper’ defined in file [D:\develop\Intellij_worksapce\panda\podonelinkpkgservice\target\classes\org\panda\pod\pkg\mapper\OrderOfferingMapper.class]: Unsatisfied dependency expressed through bean property ‘sqlSessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactory’ threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [D:\develop\Intellij_worksapce\panda\podonelinkpkgservice\target\classes\mapper\OrderOfferingMapper.xml]’; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is ‘file [D:\develop\Intellij_worksapce\panda\podonelinkpkgservice\target\classes\mapper\OrderOfferingMapper.xml]’. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘OrderedOfferingEntity’. Cause: java.lang.ClassNotFoundException: Cannot find class: OrderedOfferingEntity
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
:
586
)
[
s
p
r
i
n
g
−
b
e
a
n
s
−
5.0.8.
R
E
L
E
A
S
E
.
j
a
r
:
5.0.8.
R
E
L
E
A
S
E
]
a
t
o
r
g
.
s
p
r
i
n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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
.
d
o
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
:
572
)
[
s
p
r
i
n
g
−
b
e
a
n
s
−
5.0.8.
R
E
L
E
A
S
E
.
j
a
r
:
5.0.8.
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
:
495
)
[
s
p
r
i
n
g
−
b
e
a
n
s
−
5.0.8.
R
E
L
E
A
S
E
.
j
a
r
:
5.0.8.
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:586) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1341) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:572) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda
AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586) [spring−beans−5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91) [spring−beans−5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372) [spring−beans−5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1341) [spring−beans−5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:572) [spring−beans−5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring−beans−5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.lambdadoGetBeanKaTeX parse error: Undefined control sequence: \develop at position 2167: …ned in file [D:\̲d̲e̲v̲e̲l̲o̲p̲\Intellij_works…doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222
找不到mapper文件,检查路径:
启动类上,springbootApplication 需要加mapper 接口文件位置
接口文件配置,名字不能写错了,写错就会扫描不到。mybatis的配置方式有若干种,也可以在mapper 接口文件上加@mapper 注解。我是对mybatis不是很熟,然后按照网上的配置,两种配置方式混搭了,到时项目启动时扫描有问题。