检查lib是否正常
配置SpringMVC
出现问题,检查了很多遍都确定配置、地址都没有问题
问题分析及解决方案
LOG4J报错
配置没有问题,但是后面导入了LOG4J的jar包,一直报错,需要手动导入lib中(同上)
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-dao.xml]: Invocation of init method failed;
nested exception is org.springframework.core.
NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml];
下面表示:Mapper Configuration无法解析
nested exception is org.apache.ibatis.builder.
BuilderException: Error parsing SQL Mapper Configuration.
Cause: org.apache.ibatis.logging.LogException: Error setting Log implementation.
Cause: java.lang.NoClassDefFoundError: org/apache/log4j/Priority
没有类,那肯定是没有jar包
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778)