代码编织梦想

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.xph.boot05_mybatis_plus.Boot05MybatisPlusApplicationTests': Unsatisfied dependency expressed through field 'bookDao': No qualifying bean of type 'com.xph.boot05_mybatis_plus.dao.BookDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.xph.boot05_mybatis_plus.dao.BookDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

问题解决: 

将pom.xml中的版本3.*的换成2.多 (系统自己带的就好)的可以解决

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_59528719/article/details/129602255

springboot 整合 mybatis-plus_愿青春不负梦想.的博客-爱代码爱编程

文章目录 一、springBoot 整合 mybatis-plus二、增删改查1. 插入2. 查询4. 分页查询4. 更新5. 删除配置逻辑删除1. 数据库添加 **deleted** 字段,默认值为 0;2. 实体

【springboot】springboot整合mybatis-plus_刘婉晴的博客-爱代码爱编程

本文主要介绍 SpringBoot 整合 MyBatis-Plus 的方法,对其中容易出现的问题进行记录 MyBatis-Plus 官网介绍文档地址:https://baomidou.com/ 一、基础准备

使用spring优雅的开发业务代码-爱代码爱编程

利用框架优雅开发业务代码 demo地址 场景描述 利用spring的beanfactory可以非常方便的使用工厂,责任链,策略,订阅发布等模式来实现可扩展的业务模型。 假设现在有一种钱包业务,用户可以通过订单来

springboot整合mybatis-爱代码爱编程

1.概述 MyBatis-Plus (opens new window)(简称 MP)是一个 MyBatis (opens new window)的增强工具,在 MyBatis 的基础上只做增强不做改变,为简化开发、提高效率而生。--单表操作的都不需要自己在写sql语句。-- 愿景 我们的愿景是成为 MyBatis 最好的搭档,就像 魂斗罗

springboot整合mybatis-爱代码爱编程

文章目录 SpringBoot整合Mybatis-Plus一、环境配置1、IDEA导入插件2、数据库导入数据3、导入依赖 二、测试数据源和数据库连接情况1、application.yaml2、