@org.springframework.beans.factory.annotation.Autowired(required=true)-------不了解,粗心惹得祸,不懂惹得祸

简介: @org.springframework.beans.factory.annotation.Autowired(required=true)-------不了解,粗心惹得祸,不懂惹得祸

   大家好,我是遇到爱你三千遍斯塔克,今天敲代码很高兴又遇到了一个bug,本着有bug必须消灭的原则,开始细心的搞吧!!,

***************************

APPLICATION FAILED TO START

***************************

Description:

Field userMapper in worldtolingyidianke.file.service.impl.UserServiceImpl required a bean of type 'worldtolingyidianke.file.mappers.UserMapper' that could not be found.

The injection point has the following annotations:

   - @org.springframework.beans.factory.annotation.Autowired(required=true)

经过细心的推敲,终于找到问题引起的原因:Mapper映射这里必须要添加@Mapper注解

添加注解之后,发现不再报错了


相关文章
|
Java Maven
程序包org.springframework.transaction.annotation不存在
整合ssm报:程序包org.springframework.transaction.annotation不存在 使用注解: @Transactional 之后,就一直报不存在 最终找到原因是:maven依赖 spring-tx版本问题,换个版本就OK
1553 0
程序包org.springframework.transaction.annotation不存在
|
Java Spring
IDEA中使用org.springframework.boot.autoconfigure.AutoConfiguration.imports没有被识别
IDEA中使用org.springframework.boot.autoconfigure.AutoConfiguration.imports没有被识别
602 0
|
16天前
|
存储 Java 关系型数据库
java: 无法访问org.springframework.context.ConfigurableApplicationContext
`亲测可用,之前搜索了很多博客,啥样的都有,就是不介绍报错以及配置用处,根本不懂照抄那些配置是干啥的,稀里糊涂的按照博客搭完也跑不起来,因此记录这个。` `项目背景`:公司项目当前采用http协议+shiro+mysql的登录认证方式,而现在想支持ldap协议认证登录然后能够访问自己公司的项目网站。 `举例说明`:假设我们公司有自己的门户网站,现在我们收购了一家公司,他们数据库采用ldap存储用户数据,那么为了他们账户能登陆我们公司项目所以需要集成,而不是再把他们的账户重新在mysql再创建一遍,万一人家有1W个账户呢,不累死了且也不现实啊。
30 11
|
2月前
Consider defining a bean of type 'org.springframework.security.authentication.AuthenticationManager' in your configuration.
Consider defining a bean of type 'org.springframework.security.authentication.AuthenticationManager' in your configuration.
64 0
|
5月前
|
Java
SpringBoot注入出现@org.springframework.beans.factory.annotation.Autowired(required=true)
SpringBoot注入出现@org.springframework.beans.factory.annotation.Autowired(required=true)
64 0
|
12月前
|
Java 微服务 Spring
【Java异常】Spring boot启动失败@org.springframework.beans.factory.annotation.Autowired(required=true)
【Java异常】Spring boot启动失败@org.springframework.beans.factory.annotation.Autowired(required=true)
137 0
|
5月前
解决The injection point has the following annotations:@org.springframework.beans.factory.annotation错误~
解决The injection point has the following annotations:@org.springframework.beans.factory.annotation错误~
779 0
|
11月前
解决:org.springframework.web.method.annotation.MethodArgumentTypeMismatchExceptio
解决:org.springframework.web.method.annotation.MethodArgumentTypeMismatchExceptio
430 0
No qualifying bean of type ‘org.springframework.boot.autoconfigure.http.HttpMessageConverters‘ avail
No qualifying bean of type ‘org.springframework.boot.autoconfigure.http.HttpMessageConverters‘ avail
143 1
|
Java 数据库连接 mybatis
项目依赖问题导致No qualifying bean of type 'org.apache.ibatis.session.SqlSessionFactory' available: more tha...
项目依赖问题导致No qualifying bean of type 'org.apache.ibatis.session.SqlSessionFactory' available: more tha...
348 0