SSM商城系统开发笔记-问题02- Error creating bean with name 'userController'
2024-10-07 10:55:13
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("")
最新文章
- js原生方法传参的细节(面试必问)
- js-函数eval
- roundup配置
- 当target属性在XHTML script中无效时
- vm 安装 vcenter 本主要记录选择l现有的受支持数据库
- Java中的泛型方法
- NET开发必备工具之-LINQPad
- Linux awk小记
- java方法签名
- SQL 查找存储过程及视图与自带函数
- 动软代码生成器三层用于winform
- gradle 集成到myeclipse
- 【转】Visual Stdio VS 错误 error : 0xC00000FD: Stack overflow. 更改堆栈空间解决栈溢出问题
- 如何让微信小程序快速接入七牛云
- node实现jsonp跨域
- python3 练手实例1 计算三角形周长和面积
- c语言博客作业--结构体&;文件
- 【XSY2669】归并排序 树状数组 简单组合数学
- HTML中关于class内容空格多类名的问题详解
- git克隆源码时提示fatal: HTTP request failed怎么办?
热门文章
- bootstrap动态调用select下拉框
- 大数据笔记(十七)——Pig的安装及环境配置、数据模型
- 在php中获取 数据库的内容,返回到页面
- Linux驱动开发2——字符设备驱动
- oracle 表连接 - sort merge joins 排序合并连接
- linux 下spyder安装
- JSON基础,简单介绍
- MyBatis系列:二、配置文件详解
- 阶段1 语言基础+高级_1-3-Java语言高级_04-集合_07 Collections工具类_2_Collections集合工具类的方法
- C# datatable 导出到Excel