Cannot find class: VARCHAR
搭建的springboot框架,发现配置什么的都没有问题,一直提示Cannot find class: VARCHAR
最后发现是mappers里边有个javaType类型管理,ibatis包也提示找不到该类型VARCHAR,后来我吧varchar改成String就可以了
Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'VARCHAR'. Cause: java.lang.ClassNotFoundException: Cannot find class: VARCHAR;
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kqUserController':
Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'kqUserSeviceImpl':
Injection of resource dependencies failed;
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'kqUserDao' defined in file [G:\ideaFULL\hczk_kq\target\classes\com\example\hczkkq\dao\KqUserDao.class]:
Unsatisfied dependency expressed through bean property 'sqlSessionFactory';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]:
Factory method 'sqlSessionFactory' threw exception;
nested exception is org.springframework.core.NestedIOException:
Failed to parse mapping resource: 'file [G:\ideaFULL\hczk_kq\target\classes\mappers\KqUserMapper.xml]';
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