zoukankan      html  css  js  c++  java
  • org.apache.ibatis.type.TypeException: Could not resolve type alias 'BIGINT'

    异常

    Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'BIGINT'.  Cause: java.lang.ClassNotFoundException: Cannot find class: BIGINT
        at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:120) ~[mybatis-3.4.4.jar:3.4.4]
        at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:149) ~[mybatis-3.4.4.jar:3.4.4]
        at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:116) ~[mybatis-3.4.4.jar:3.4.4]
        ... 81 common frames omitted
    Caused by: java.lang.ClassNotFoundException: Cannot find class: BIGINT
        at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:200) ~[mybatis-3.4.4.jar:3.4.4]
        at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:89) ~[mybatis-3.4.4.jar:3.4.4]
        at org.apache.ibatis.io.Resources.classForName(Resources.java:261) ~[mybatis-3.4.4.jar:3.4.4]
        at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:116) ~[mybatis-3.4.4.jar:3.4.4]
        ... 83 common frames omitted
    
    
    Process finished with exit code 1

    原因:自己的粗心大意,jdbcType被我写成了javaType

    <resultMap id="BaseResultMap" type="com.atguigu.springcloud.entities.xxxx">
            <id column="id" property="id" javaType="BIGINT"/>
            <id column="serial" property="serial" jdbcType="VARCHAR"/>
        </resultMap>

    解决办法:JavaType对应的是类里的数据类型,jdbcType对应数据库里的类型

    将javaType 改成jdbcType就可以了

  • 相关阅读:
    SQL Server和Oracle数据库索引介绍
    ITPUB上一个Oracle面试题
    国服《巫妖王之怒》3.35冰双持新手献礼指南
    WLK奥法输出循环
    flume架构初接触
    密码校验正则表达式(java 环境)
    初学Mahout测试kmeans算法
    身份证校验(java)
    gcc 中 O选项对空函数的优化
    《肖申克的救赎》语录
  • 原文地址:https://www.cnblogs.com/XiDaPuBen/p/13059986.html
Copyright © 2011-2022 走看看