程序出现异常[A query was run and no Result Maps were found for the Mapped Statement ‘*‘. It’s likely that neither a Result Type nor a Result Map was specified.
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:76) ~[mybatis-spring-1.2.3.jar:1.2.3]
at org.mybatis.spring.SqlSessionTemplate
SqlSessionInterceptor.invoke(SqlSessionTemplate.java:399) [mybatis−spring−1.2.3.jar:1.2.3]atcom.sun.proxy.
S
q
l
S
e
s
s
i
o
n
I
n
t
e
r
c
e
p
t
o
r
.
i
n
v
o
k
e
(
S
q
l
S
e
s
s
i
o
n
T
e
m
p
l
a
t
e
.
j
a
v
a
:
399
)
[
m
y
b
a
t
i
s
−
s
p
r
i
n
g
−
1.2.3.
j
a
r
:
1.2.3
]
a
t
c
o
m
.
s
u
n
.
p
r
o
x
y
.
Proxy54.selectList(Unknown Source) ~[?:?]
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:205) ~[mybatis-spring-1.2.3.jar:1.2.3]………………
仔细查看mybatis的配置文件,发现遗漏一个属性:resultType
最后总结下,就是mybatis中的所有查询,都必须返回resultType或者resultMap的值,否则就会报如上错误的。