当前位置:网站首页>Could not autowire.No beans of ‘userMapper‘ type found.
Could not autowire.No beans of ‘userMapper‘ type found.
2022-07-27 05:00:00 【修罗_】
这里并没有错误,但是IDEA报红

package com.example.demo.mapper;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@SpringBootTest
@RunWith(SpringRunner.class) // 启动这个单元测试类
public class UserMapperTest {
@Autowired
UserMapper userMapper;
public void insert() {
}
}
点击File>Settings>Inspections>Spring>Spring Core>Core>Autowiring for Bean Class>Severity:No highlighting,only fix
最后点击ok

解决
边栏推荐
- 事件的接受与忽略
- Installation and template setting of integrated development environment pychar
- Cache read / write policies: cacheside, read/writethrough and writeback policies
- "Photoshop2021 tutorial" adjust the picture to different aspect ratio
- 2019 top tennis cup upload
- 自定义视口高度,多余的部分使用滚动
- Hiding skills of Photoshop clipping tool
- How to create an applet project
- 对话框简介
- Final Cut Pro中文教程 (1) 基础认识Final Cut Pro
猜你喜欢

一、MySQL基础

Sunset red warm tone tinting filter LUTS preset sunset LUTS 1

ps样式如何导入?Photoshop样式导入教程

项目对接支付宝支付,内网穿透实现监听支付宝的支付成功异步回调通知

Why is count (*) slow

34. 分析flexible.js

事件(event)

MySQL download and installation & perfect uninstall

"Photoshop2021 tutorial" align and distribute to make dot patterns

MQ message queue is used to design the high concurrency of the order placing process, the generation scenarios and solutions of message squeeze, message loss and message repetition
随机推荐
Explanation of index failure principle and its common situations
Solution: how to use bash batch command in win10
[search] two way search + A*
[search] - multi source BFS + minimum step model
Flexible array and common problems
strlen和sizeof的区别
Photoshop裁剪工具隐藏技巧
How do I reset Photoshop preferences? PS method of resetting preferences
How does PS import LUT presets? Photoshop import LUT color preset tutorial
[C language] dynamic memory management
Final Cut Pro Chinese tutorial (2) understanding of material window
柔性数组以及常见问题
On the problem that Gorm's beforedelete hook method does not work
树莓派rtmp推流本地摄像头图像
探寻通用奥特能平台安全、智能、性能的奥秘!
static和final关键字 学习 demo练习
How to import PS style? Photoshop style import tutorial
Counting Nodes in a Binary Search Tree
Why is select not recommended*
vim的基本操作