mybatis异常:Cannot find class: VARCHAR

报错信息如下所示:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountSeqService': Injection of autowired dependencies failed; nested exception is     org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tjgjk.mapper.account.card.AccountSeqMapper   com.tjgjk.service.account.card.impl.AccountSeqServiceImpl.accountSeqMapper; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type   [com.tjgjk.mapper.account.card.AccountSeqMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations:   {@org.springframework.beans.factory.annotation.Autowired(required=true)}

  Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountSeqMapper' defined in file [E:\tomcat8\apache-tomcat-8.0.39-windows-x86\apache- tomcat-  8.0.39\wtpwebapps\tjgjk\WEB-INF\classes\com\tjgjk\mapper\account\card\AccountSeqMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException:     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

  at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.

  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.

  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.

  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.

  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.

  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.

  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.

  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.

  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.

  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.

  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.

  at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.

  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.

  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.

  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.

  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.

  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.

  当时就一顿好找,因为错误中提示是在 解析XML文件时出错,所以在XML里来来回回查找三、四遍,愣是没找到具体错误原因,

    然后是在受不了了就去Google了下,没想到具体原因实在是让人难以启齿啊,见图

  IBatis异常: <wbr>Cannot <wbr>find <wbr>class: <wbr>VARCHAR

 

  JavaType对应的是类里的数据类型,jdbcType对应数据库里的类型

  jdbcType被我写成了javaType,想哭,也在此提醒下各位小伙伴,使用快捷键时一定要看好是不是所对应的方法,

    以此,给自己一个警告。

  • 11
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 7
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

茂林修竹丶

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值