Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'userService';
nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
No qualifying bean of type 'com.boron.service.UserService' available: expected at least 1 bean which qualifies as autowire candidate.
Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

原因:service层没有加注解
在搭spring mvc框架时,ide不会报错但会有编译错误的几个注意事项:
1.controller 加注解
@RestController
@RequestMapping("/user") 2.service加注解 @Service
@Autowired
3.dao 加注解和实现接口
@Param("")
												

SSM商城系统开发笔记-问题02- Error creating bean with name 'userController'的更多相关文章

  1. SSM商城系统开发笔记-配置01-web.xml

    先占坑 慢慢填, 商城系统使用主体框架:Spring + Spring MVC + Mybatis 其他框架: 日志: slf4j + logback <!DOCTYPE web-app PUB ...

  2. SSM商城系统开发笔记-问题01-通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明。

    配置搭建完后进行Post请求测试时报错: Caused by: org.xml.sax.SAXParseException; lineNumber: 14; columnNumber: 29; cvc ...

  3. Springboot异常:org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController'

    今天本菜鸟编写程序时,遇到了一个异常. org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating ...

  4. mvn ssm 异常 org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'multipartResolver'

    解决方案: 添加 commons-fileupload-1.2.jar <!-- https://mvnrepository.com/artifact/commons-fileupload/co ...

  5. Error creating bean with name &#39;menuController&#39;: Injection of autowired dependency……

    出现了一大串错误 Error creating bean with name 'userController': Injection of autowired dependencies failed. ...

  6. 微信小程序购物商城系统开发系列-目录结构

    上一篇我们简单介绍了一下微信小程序的IDE(微信小程序购物商城系统开发系列-工具篇),相信大家都已经蠢蠢欲试建立一个自己的小程序,去完成一个独立的商城网站. 先别着急我们一步步来,先尝试下写一个自己的 ...

  7. 微信小程序购物商城系统开发系列

    微信小程序购物商城系统开发系列 微信小程序开放公测以来,一夜之间在各种技术社区中就火起来啦.对于它 估计大家都不陌生了,对于它未来的价值就不再赘述,简单一句话:可以把小程序简单理解为一个新的操作系统. ...

  8. 途虎养车Tuhu商城系统开发

    途虎养车Tuhu商城系统开发,咨询:何经理152-2217-7508(微信同号)途虎养车商城小程序开发,途虎养车商城小程序平台开发,途虎养车商城小程序系统开发. 为什么能做得这么好,里面的门道确实不少 ...

  9. MyBatis笔记----报错:Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/ij34/mybatis/applicationContext.xml]: Invocation of init method failed; nested exception is org.sp

    四月 05, 2017 4:51:02 下午 org.springframework.context.support.ClassPathXmlApplicationContext prepareRef ...

随机推荐

  1. mysql INNER JOIN关键字 语法

    mysql INNER JOIN关键字 语法 作用:在表中存在至少一个匹配时,INNER JOIN 关键字返回行.大理石平台维修 语法:SELECT column_name(s) FROM table ...

  2. git 部署服务

    git 知识 服务器知识 1.在本地完成代码的编写, 然后通过 git 管理版本. 在编码完成后 git push 到 git 云端(github 或者 码云 及其他). 2.在服务器端安装 git ...

  3. abc136

    第一次打ABC 题目简单,但我菜 E - Max GCD 可以任选两个数,一个减去1,一个加上1,可以操作$0,\cdots,K$次,求操作后数组最大GCD 枚举数组之和的因子,试图找到符合题意的最大 ...

  4. 小程序中css3实现优惠券

    效果如下: css3实现优惠券 知识储备 颜色渐变 linear-gradient() css伪类 :before :after index.wxss .app { /* padding: 20rpx ...

  5. POJ 1434 Fill the Cisterns! (模拟 or 二分)

    Fill the Cisterns! 题目链接: http://acm.hust.edu.cn/vjudge/contest/129783#problem/F Description During t ...

  6. 笔记本连接树莓派3b(不需要屏幕)

    一.网线直连 工具:笔记本,网线,树莓派 软件:putty 过程: 将系统烧录进SD卡后,在root里添加一个名字为“ssh”的空白文件(不需后缀名)来开启ssh服务,SD卡里的cmdline.txt ...

  7. 20175221曾祥杰 实验三《敏捷开发与XP实践》

    实验三<敏捷开发与XP实践> 实验报告封面 课程:Java程序设计 班级:1752班 姓名:曾祥杰 学号:20175221 指导教师:娄嘉鹏 实验日期:2019年4月30日 实验时间:13 ...

  8. SQL Server DACPAC数据库部署错误

    DACPAC使用sqlpackage.exe进行部署,部署时候报错: EXEC : error SQL72035: [dbo].[table] is under change data capture ...

  9. SourceTree跳过初始设置

    转载https://www.cnblogs.com/xiofee/p/sourcetree_pass_initialization_setup.html 如何跳过初始设置,只需要在安装路径中添加一个a ...

  10. leetcode-mid-array-73 set matrix zeros

    mycode 空间复杂度 m+n 思路:用set把为0元素所在行.列记录下来 注意:注释的方法更快 class Solution(object): def setZeroes(self, matrix ...