spring boot开发 @autowired注入失败
@autowired注入失败 会出现如下错误提示:
2018-05-28 08:39:41.857 INFO 8080 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate Core {5.2.17.Final}
2018-05-28 08:39:41.859 INFO 8080 --- [ restartedMain] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2018-05-28 08:39:41.988 INFO 8080 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2018-05-28 08:39:42.143 INFO 8080 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2018-05-28 08:39:42.288 INFO 8080 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2018-05-28 08:39:42.561 WARN 8080 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'BController': Unsatisfied dependency expressed through field 'supplierService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.nenu.service.SupplierService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2018-05-28 08:39:42.561 INFO 8080 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2018-05-28 08:39:42.562 INFO 8080 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2018-05-28 08:39:42.566 INFO 8080 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
2018-05-28 08:39:42.568 INFO 8080 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2018-05-28 08:39:42.580 INFO 8080 --- [ restartedMain] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-05-28 08:39:42.718 ERROR 8080 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Field supplierService in com.nenu.controller.BController required a bean of type 'com.nenu.service.SupplierService' that could not be found.
Action:
Consider defining a bean of type 'com.nenu.service.SupplierService' in your configuration.
修改:
SupplierServiceImpl 没有添加@service注入

参考链接:https://blog.csdn.net/chengdu456/article/details/39504057
spring boot开发 @autowired注入失败的更多相关文章
- Spring security UserDetailsService autowired注入失败错误
最近使用spring mvc + spring security 实现登录权限控制的时候,一直不能成功登录,检查过后是dao一直无法注入为null CustomUserDetailConfig.jav ...
- 【Intellij idea】spring中@Autowired注入失败
@Autowired注入失败失败的解决办法? 现有的解决的方案是: 打开file-settings或者ctrl+alt+s -> Editor 然后在Inspections 点击搜索栏 输入Sp ...
- spring boot 中@Autowired注解无法自动注入的错误
版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/huihuilovei/article/de ...
- 天天玩微信,Spring Boot 开发私有即时通信系统了解一下
1/ 概述 利用Spring Boot作为基础框架,Spring Security作为安全框架,WebSocket作为通信框架,实现点对点聊天和群聊天. 2/ 所需依赖 Spring Boot 版本 ...
- Spring Boot 开发集成 WebSocket,实现私有即时通信系统
1/ 概述 利用Spring Boot作为基础框架,Spring Security作为安全框架,WebSocket作为通信框架,实现点对点聊天和群聊天. 2/ 所需依赖 Spring Boot 版本 ...
- Spring Boot 开发微信公众号后台
Hello 各位小伙伴,松哥今天要和大家聊一个有意思的话题,就是使用 Spring Boot 开发微信公众号后台. 很多小伙伴可能注意到松哥的个人网站(http://www.javaboy.org)前 ...
- 使用Spring Boot开发Web项目(二)之添加HTTPS支持
上篇博客使用Spring Boot开发Web项目我们简单介绍了使用如何使用Spring Boot创建一个使用了Thymeleaf模板引擎的Web项目,当然这还远远不够.今天我们再来看看如何给我们的We ...
- 使用Spring boot开发RestFul 风格项目PUT/DELETE方法不起作用
在使用Spring boot 开发restful 风格的项目,put.delete方法不起作用,解决办法. 实体类Student @Data public class Student { privat ...
- Spring Boot 开发系列一 开发环境的一些九九
从今天开始写这个Spring Boot 开发系列,我是第二周学习JAVA的,公司号称springboot把JAVA的开发提升到填空的能力,本人是NET转JAVA的,想看看这个填空的东西到底有多强.废话 ...
随机推荐
- VMware coding Challenge: Coin Toss Betting
static int CoinTossEndAmount(int betAmount, String coinTossResults) { if (betAmount <=0 || coinTo ...
- 002-ubuntu安装
一.安装了ubuntu desktop版本后: 1.进行桥接联网. 2.运行更新:#sudo apt-get update. 3.安装net-tools网络工具包:#sudo apt install ...
- java的时间处理
采用joda.time库 gradle,可以简化calendar的 compile "joda-time:joda-time:2.7" 例子:http://blog.csdn.ne ...
- POJ3608
计算两个凸包之间的最小距离,旋转卡壳法详解在旋转卡壳的用法之计算两个凸 包上的最近距离 #include <iostream> #include<cstdio> #includ ...
- mysql备份恢复详解
前言 为什么需要备份数据? 数据的备份类型 MySQL备份数据的方式 备份需要考虑的问题 设计合适的备份策略 实战演练 使用cp进行备份 使用mysqldump+复制BINARY LOG备份 使用lv ...
- Linux基础命令---sort
sort 以行为单位,对文本文件进行排,并输出排序结果.默认情况下,以每一行为一个单位,从首字符开始按照ASCII码向后逐个比较. 此命令的适用范围:RedHat.RHEL.Ubuntu.CentOS ...
- python基础七--集合
12.221.昨日内容回顾 小数据池: int:-5--256 str:1.不能有特殊字符 2.*int不能超过20 编码:所能看到的最小构成单位叫字符 ascii : 8位 1字节 表示1个字符 u ...
- python之路----网络编程--黏包
黏包现象 让我们基于tcp先制作一个远程执行命令的程序(命令ls -l ; lllllll ; pwd) res=subprocess.Popen(cmd.decode('utf-8'), shell ...
- ELK之elasticsearch6.5
官方网站:https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html 这里采用rpm的方式安装: # wget h ...
- 20145105 《Java程序设计》第9周学习总结
20145105 <Java程序设计>第9周学习总结 教材学习内容总结 第十六章 整合数据库 一.JDBC入门 (一)JDBC简介 厂商在操作JDBC驱动程序时,依操作方式可将驱动程序分为 ...