严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in file [D:\tomcat\apache-tomcat-7.0.57\webapps\questionnaire\WEB-INF\classes\config\spring-common.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [D:\tomcat\apache-tomcat-7.0.57\webapps\questionnaire\WEB-INF\classes\config\spring-common.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [config/mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Xzl'. Cause: java.lang.ClassNotFoundException: Cannot find class: Xzl
用typeAlias一行一行的写就没问题,用package代替就有问题?
低级错误.
你包名叫
model
, 而你定义别名时所写的包名叫mode
.