Spring mvc 报错:No qualifying bean of type [java.lang.String] found for dependency:
具体错误:
No qualifying bean of type [java.lang.String] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
原因:
1.对应要注入的实现类没有 加注解,如dao层 @Repository 如service层 @Service
2."You generally autowire to your interface type and not impl."调用的接口是否有具体的实现类。
3.@Autowired下面,没有类,直接跟了@RequestMapping。【我报错的原因。无语....】
Spring mvc 报错:No qualifying bean of type [java.lang.String] found for dependency:的更多相关文章
- No qualifying bean of type [java.lang.String] found for dependency: expected
出现这个问题的原因是因为多写了一个注解但是没有实体类.如: 或者其他注解下没有内容.
- springMVC 报错:Unknown return value type: java.lang.Integer
controller层返回值类型为Integer,运行报错: Unknown return value type: java.lang.Integer 解决办法:在此方法上写上注解 @Response ...
- Jpa自定义查询报错(Failed to convert from type [java.lang.Object[]] to type)
Jpa自定义查询报错 问题背景 今天遇到一个奇怪的报错"Failed to convert from type [java.lang.Object[]] to type",这个报错 ...
- spring-boot 应用 报错 No qualifying bean of type XXXXX.***Mapper
报错类型 NoSuchBeanDefinitionException.No qualifying bean of type XXXXX.***Mapper 报错信息详情 Caused by: org ...
- 【spring mvc】后台API查询接口,get请求,后台Date字段接收前台String类型的时间,报错default message [Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'createDate';
后台API查询接口,get请求,后台Date字段接收前台String类型的时间筛选条件 后台接口接收 使用的实体 而createDate字段在后台实体中是Date类型 报错信息: org.spring ...
- Spring Cloud报错Error creating bean with name 'requestMappingHandlerMapping'
如果我们使用Spring Cloud的Feign实现熔断,首先需要自定义一个熔断类,实现你的feign接口,然后实现方法,这些方法就是熔断方法,最后需要在你的feign接口中指定fallback为自定 ...
- 解决spring mvc 上传报错,Field [] isn't an enum value,Failed to convert value of type 'java.lang.String[]' to required type '
没有选择附件,但是点击上传按钮的时候会报错. 之前不选择文件,直接上传空文件是可以的,后来不知道改了什么就不行了. 错误信息: -- :: [http--] TRACE org.springframe ...
- 【spring boot】spring boot 前台GET请求,传递时间类型的字符串,后台无法解析,报错:Failed to convert from type [java.lang.String] to type [java.util.Date]
spring boot 前台GET请求,传递时间类型的字符串,后台无法解析,报错:Failed to convert from type [java.lang.String] to type [jav ...
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [dx.service.ItemService] found for dependency
在整合ssm框架,测试service层的时候报错 Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: ...
随机推荐
- Objective-C学习笔记之for( int )机制
NSArray *myArray = [NSArray arrayWithObjects:@"1",@"2",@"3",@"4&q ...
- 用css进行布局
用css进行布局 一,开始布局的注意事项 1.作为最佳实践,应把html(内容)和css(显示)分离: 2.网站设计主要有两大类型:固定宽度(基于像素)和响应式(也称流式,使用百分数定义) 二,构建 ...
- 模拟退火解决TSP问题
// monituihuo.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include <stdio.h> #includ ...
- WinForm------GridControl的部分属性介绍
参考其它链接: http://www.cnblogs.com/djian/archive/2010/11/19/1881579.html //注意:在定义GridControl里面的FileName里 ...
- electron package can not find module xml2json
问题 electron 打包好的应用找不到xml2json 但是开发环境npm start 运行正常 定位 node_modules没有包含在打的包中, 解决办法 --no-prune Be care ...
- HTML学习笔记——frameset和marquee
1>frameset 效果如百Google度 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ...
- js获取锚点名称 #
var thisId = window.location.hash; alert(thisId); 输出 #2
- $().index() 两种用法
第一种:获得第一个 p 元素的名称和值: $(this).index() <script type="text/javascript"> $(document).rea ...
- webform中使用webapi,并且使用autofac
private void AutofacIoCRegister() { HttpConfiguration config = GlobalConfiguration.Configuration; if ...
- validate jquery 注册页面使用实例 详解
官方使用文档:http://jqueryvalidation.org/documentation/ 参考资料:http://www.w3cschool.cc/jquery/jquery-plugin- ...