4.警告:
Exception encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException:
上下文初始化期间遇到的异常-取消刷新尝试:
Error creating bean with name ‘org.mybatis.spring.SqlSessionFactoryBean#0’ defined in file [W:\java\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SalesMangement\WEB-INF\classes\spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [W:\java\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SalesMangement\WEB-INF\classes\mappers\DictMapper.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 ‘net.ifwang.bean.Province’. Cause: java.lang.ClassNotFoundException: Cannot find class: net.ifwang.bean.Province
十一月 12, 2018 10:21:57 上午 org.springframework.web.servlet.FrameworkServlet initServletBean
问题说明:上下文初始化-取消刷新尝试时遇到的异常:
解决方法(1):service没加注解,可以检查一下自己的注解是否都加上了。
解决方法(2):在spring中遇到了该错误,解决办法是---->删除了多余jar包----->aopalliance.jar