后端springboot搭建的报错

问题遇到的现象和发生背景

报错idea

运行结果及报错内容
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-09-29 17:17:07.178 ERROR 9716 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

A component required a bean of type 'com.example.onedemo.mapper.UserMapper' that could not be found.


Action:

Consider defining a bean of type 'com.example.onedemo.mapper.UserMapper' in your configuration.


Process finished with exit code 0

运行结果及报错内容

想学springboot来做毕设但是学着学着四不像,哭了。这个是跟学的文章https://blog.csdn.net/xqnode/article/details/113079010?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522166443922716782391833416%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=166443922716782391833416&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-113079010-null-null.142^v51^pc_rank_34_queryrelevant25,201^v3^add_ask&utm_term=springboot%E9%9B%86%E6%88%90mybatis%E4%BF%9D%E5%A7%86%E7%BA%A7&spm=1018.2226.3001.4187
我不知道为什么报错,哭了,根本不会

启动类上加个@MapperScan(value = "mapper类的位置")

远程看看

我这里介绍一套给你生产实战过的,源码教程都有!非常适合学习! 「分布式多数据源读写分离jenkins/Drone k8s集群灰度/自动发布源码」