Error creating bean with name 'sqlSessionFactory' defined in class path resource [config/spring/appl

Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [config/spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [D:\Java Projects\apache-tomcat-8.5.50\webapps\OnlineShop\WEB-INF\classes\config\mybatis\mapper\admin\AuthorityMapper.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 ‘Authority’. Cause: java.lang.ClassNotFoundException: Cannot find class: Authority

导入Java写的SSM项目,突然提示这个问题,以前也经常遇到,今天终于找到原因了,该问题是发生在MyEclipse 2018上,一个在其他电脑上可以成功运行的项目,导入到另外一台电脑上,运行,就会报如上错误,仔细检查了代码,是没有任何问题的,包括数据库连接。今天仔细看了一下,是刚刚导入项目,class没有编译好,clean项目有时候都解决不了,这个得退出MyEclipse 2018,然后重新进入,在部署到Tomcat运行,就可以成功运行起来了。
和大家分享一下经验,觉得能帮助到的可以关注一下!感谢!

你可能感兴趣的:(Java)