开发者社区> 问答> 正文

Spring+mybatis+SpringMVC构建项目报错?报错

刚接触Springle,做个实验。配置文件感觉没错,但总是报错警告: Bean creation exception on FactoryBean type check: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'loadBalanceConnectionGroupManagerMBean' defined in URL [jar:file:/F:/Program%20Files/tomcat/wtpwebapps/shop/WEB-INF/lib/mysql-connector-java-5.1.34.jar!/com/mysql/jdbc/jmx/LoadBalanceConnectionGroupManagerMBean.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-mybatis.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [F:\Program Files\tomcat\wtpwebapps\shop\WEB-INF\classes\com\mapping\UserMapper.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 'com.been.User'.  Cause: java.lang.ClassNotFoundException: Cannot find class: com.been.User; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-mybatis.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [F:\Program Files\tomcat\wtpwebapps\shop\WEB-INF\classes\com\mapping\UserMapper.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 'com.been.User'.  Cause: java.lang.ClassNotFoundException: Cannot find class: com.been.User

求解!!!!!!

展开
收起
爱吃鱼的程序员 2020-06-09 13:29:45 698 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    <spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;"> Cannotfindclass:com.been.User写的很明白````也可能usermapper.xml里实体路劲错误

    2020-06-09 13:30:01
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Spring Cloud 微服务核心组件集 mica 的设计思路 立即下载
workshop专场-微服务专场-开发者动手实践营-微服务-Spring Cloud Alibaba 微服务全家桶体验 立即下载
云栖社区特邀专家徐雷Java Spring Boot开发实战系列课程(第20讲):经典面试题与阿里等名企内部招聘求职面试技巧 立即下载

相关实验场景

更多