java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.sojs

来源:互联网 发布:电脑上的c语言编程软件 编辑:程序博客网 时间:2024/06/06 11:46

java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.sojson.app.dao.NoticeManagerDao.queryNotification

出现上述问题至少有俩种可能

1、这里面没有匹配到

<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="configLocation" value="classpath:mybatis-config.xml" />
<property name="mapperLocations">
<array>
<value>classpath:com/sojson/*/mapp*/*.xml</value>
<value>classpath*:com/hongao/duomiwan/*/mapper/*.xml</value>
</array>
</property>
</bean>


2、namespace 没有引用正确

<mapper namespace="com.sojson.app.dao.NoticeManagerDa" >

3、id不匹配

<select id="queryNotificationNum" parameterType="com.sojson.app.entity.Notification" resultType="int">


阅读全文
0 0