Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘t

简介: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘t

今天在敲代码的时候出现了bug:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tonameMapper' defined in file [D:\project\零一电科\技术资料\lingyidianke\zeroBackEnd\ZerosBackEnd\target\classes\zero\file\videoProject\mappers\untils\tonameMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'zero/file/videoProject/mappers/untils/tonameMapper.xml'. Cause: org.apache.ibatis.builder.BuilderException: Wrong namespace. Expected 'zero.file.videoProject.mappers.untils.tonameMapper' but found 'zero.file.videoProject.mappers.untils'.

翻译

原因:org . spring framework . beans . factory . beancreationexception:创建在文件【D:\project\零一电科\技术资料\ lingyidianke \ zero back end \ ZerosBackEnd \ target \ classes \ zero \ file \ video project \ mappers \ untils \ tonamemapper . class】:调用init方法失败;嵌套异常为Java . lang . illegalargumentexception:org . Apache . ibatis . builder . builder异常:解析映射器XML时出错。XML位置为“zero/file/video project/mappers/until s/tonamemapper . XML”。原因:org . Apache . ibatis . builder . builder异常:错误的命名空间。应为“zero . file . video project . mappers . untils . tonamemapper”,但找到了“zero . file . video project . mappers . untils”。

自己xml文件的命名空间只定义到了untils当中,而没有定义tonameMapper这里

改成这样就行了,复制与tonameMapper文件相同就行了


相关文章
|
5月前
|
Java Apache Spring
若依配Mapper,若依修改Caused by: org.springframework.beans.factory.BeanCreationException: Error creating
若依配Mapper,若依修改Caused by: org.springframework.beans.factory.BeanCreationException: Error creating
|
5月前
|
Java Spring
nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException(Spring循环依赖问题)
nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException(Spring循环依赖问题)
132 0
|
7月前
|
Java
SpringBoot注入出现@org.springframework.beans.factory.annotation.Autowired(required=true)
SpringBoot注入出现@org.springframework.beans.factory.annotation.Autowired(required=true)
113 0
|
6月前
|
Java Spring
【ERROR】Exception in thread “main“ org.springframework.beans.factory.NoSuchBeanDefinitionException
【ERROR】Exception in thread “main“ org.springframework.beans.factory.NoSuchBeanDefinitionException
52 0
|
Java 微服务 Spring
【Java异常】Spring boot启动失败@org.springframework.beans.factory.annotation.Autowired(required=true)
【Java异常】Spring boot启动失败@org.springframework.beans.factory.annotation.Autowired(required=true)
365 0
|
7月前
|
安全 Java 数据库连接
java.lang.NoClassDefFoundError: org/springframework/beans/factory/config/YamlProcessor$StrictMapAppe
java.lang.NoClassDefFoundError: org/springframework/beans/factory/config/YamlProcessor$StrictMapAppe
77 0
|
7月前
|
容器
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
122 0
|
7月前
解决The injection point has the following annotations:@org.springframework.beans.factory.annotation错误~
解决The injection point has the following annotations:@org.springframework.beans.factory.annotation错误~
1199 0
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServer
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServer
|
Java 数据库连接 Spring
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ XXX‘
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ XXX‘
310 0