Error creating bean with name ‘sqlSessionFactory‘ defined in class path resource

错误描述(在日志里看)

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [D:\Java\ssm-04\out\artifacts\ssm_04_war_exploded\WEB-INF\classes\mapper\AuthorMapper.xml]’; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is ‘file [D:\Java\ssm-04\out\artifacts\ssm_04_war_exploded\WEB-INF\classes\mapper\AuthorMapper.xml]’. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘com.haina.com.haina.ssm.model.Author’. Cause: java.lang.ClassNotFoundException: Cannot find class: com.haina.com.haina.ssm.model.Author

直接解决办法

查看你的数据库有没有挂掉!!

如何重新启动数据库

重新启动数据库的流程

引用\[1\]:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defines in class path resource \[org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvConfiguration.class\]: 。 引用\[2\]:Error creating bean with name ‘requestMappingHandlerMapping’ defined in class path resource \[org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class\]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map ‘crmNicheController’ method 启动报错解决记录 。 引用\[3\]:那么如果是这种问题在运行了项目之后报错了怎么解决呢,出现这种的错误代码,我们首先应该根据23体验网上面提到的,检查一下pom.xml文件中有没有这个maven包被引入: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId> <version>1.5.4.RELEASE</version> </dependency> 。 问题:rror creating bean with name 'requestMappingHandlerMapping' defined in class path resource 回答: 这个错误通常是由于Spring框架的配置问题引起的。根据引用\[1\]和引用\[2\]的描述,这个错误可能是由于RequestMappingHandlerMapping的定义或初始化方法失败导致的。可能的原因是映射冲突或依赖包未正确引入。根据引用\[3\]的建议,你可以检查你的pom.xml文件中是否引入了正确的maven包,并确保版本号与你的项目兼容。另外,你还可以检查RequestMappingHandlerMapping的配置是否正确,避免映射冲突。如果问题仍然存在,你可以进一步查看错误日志以获取更多详细信息,并根据具体情况采取相应的解决措施。 #### 引用[.reference_title] - *1* *3* [异常:Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource的...](https://blog.csdn.net/weixin_44259720/article/details/103144694)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [Error creating bean with name ‘requestMappingHandlerMapping‘ defined in class path resource报错](https://blog.csdn.net/qq_40775389/article/details/123846278)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值