Consider defining a bean of type ‘com.example.democrud.democurd.usermapper.DaoMapper‘ in your config

简介: Consider defining a bean of type ‘com.example.democrud.democurd.usermapper.DaoMapper‘ in your config
Description: 
A component required a bean of type 'com.example.democrud.democurd.usermapper.DaoMapper' that could not be found.  Error creating bean with name 'userServiceImpl': 
Action: 
Consider defining a bean of type 'com.example.democrud.democurd.usermapper.DaoMapper' in your configuration.


我自己解决方式:

在pom导入mybatis

<!-- mybatis整合Springboot -->
<dependency>
    <groupId>org.mybatis.spring.boot</groupId>
    <artifactId>mybatis-spring-boot-starter</artifactId>
    <version>1.1.1</version>
</dependency>


注解在mapper 加入 @Mapper

也可加mapperscan(“mapper路径”) @Mapper


在启动类加入

@MapperScan(basePackages = "com.example.democrud.democurd.usermapper") 



相关文章
config.guess: unable to guess system type、config.sub: missing argument
config.guess: unable to guess system type、config.sub: missing argument
102 0
checking build system type... ./config.guess: unable to guess system type/you must specify one
checking build system type... ./config.guess: unable to guess system type/you must specify one
110 0
config.guess: unable to guess system type、config.sub: missing argument
config.guess: unable to guess system type、config.sub: missing argument
365 0
|
18天前
|
Java 数据库连接 开发工具
web后端-SpringCloud-Config分布配置
web后端-SpringCloud-Config分布配置
|
18天前
|
API
在vite.config.js 配置代理
在vite.config.js 配置代理
123 2
|
18天前
|
自然语言处理 JavaScript
vue element plus Config Provider 全局配置
vue element plus Config Provider 全局配置
43 0
|
16天前
|
移动开发 前端开发 JavaScript
Vue2 系列:vue.config.js 参数配置
Vue2 系列:vue.config.js 参数配置
24 2
|
18天前
|
前端开发 API
nuxt.config.js 配置
我们在使用Nuxt.js提供的create-nuxt-app 创建项目后,更希望对它自定义一些东西,这里我们可以在根目录下找到nuxt.config.js
27 7
|
18天前
|
开发框架 JSON .NET
.Net4.0 Web.config 配置实践
.Net4.0 Web.config 配置实践
|
18天前
|
JSON JavaScript 前端开发
vue2_vite.config.js的proxy跨域配置和nginx配置代理有啥区别?
vue2_vite.config.js的proxy跨域配置和nginx配置代理有啥区别?
44 1

热门文章

最新文章