zoukankan      html  css  js  c++  java
  • nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeEx

    1、环境mybaties:

    配置映射运行时出现:nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'VARCHAR'.  Cause: java.lang.ClassNotFoundException: Cannot find class: VARCHAR

    2、仔细检查了十几分钟,才发现映射配置错误;

    改前:

    <result column="FILE_ID" javaType="VARCHAR" property="fileId"/>

    改后:
    <result column="FILE_ID" jdbcType="VARCHAR" property="fileId"/>


    3、牵扯出下面两者的区别
    javaType:表示的实体类中字段的类别
    jdbcType:表示的数据库表中的字段类别;
  • 相关阅读:
    小球下落
    生成1~n的排列
    hdu1871无题
    android本地定时通知
    php 5.3起弃用session_register
    centos 6.3 编译安装 nginx +mysql + php
    skynet网络库socketserver
    mac下通过docker搭建LEMP环境
    Git操作
    iOS本地通知
  • 原文地址:https://www.cnblogs.com/daguozb/p/8384015.html
Copyright © 2011-2022 走看看