报错信息如下所示:
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了下,没想到具体原因实在是让人难以启齿啊,见图
JavaType对应的是类里的数据类型,jdbcType对应数据库里的类型
jdbcType被我写成了javaType,想哭,也在此提醒下各位小伙伴,使用快捷键时一定要看好是不是所对应的方法,
以此,给自己一个警告。