使用Mybatis的时候出现这个问题是因为配置文件的问题造成的,mybatis需要写大量的配置文件,

尽管有mybatis-generator,但是里面的内容有很多还是要自己去写的,在这过程中难免会出现问题,

上述问题是因为返回类型错误造成的,resultMap属性的返回类型错误,如下

<select id="getListBy" parameterType="com.cbt.staticize.model.Intensve" resultMap="java.lang.Integer">
    select 
    <include refid="Base_Column_List"/>
    from intensve where valid=1 and word!="" and word is not null
    <include refid="basesql"/>
  </select>

把其中的resultMap="java.lang.Integer"改为对应的返回类型,如<resultMap 即可。

注意:该错误不会指向某个xml,只要任一配置文件出错,运行程序均会报该错误,所以只能逐个mapper.xml查找。可利用eclipse的全局文本搜索进行排除

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-25
  • 2021-07-26
  • 2021-09-27
  • 2021-07-08
  • 2021-06-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案