关于@Select注解报红报错问题的解决

1.问题描述

想引用@Select注解但是发现写完后报红

94bd853374604d8694d084c8af3de515.png

2.解决方法

1.在pom.xml中添加依赖:

    <dependency>      <groupId>org.apache.ibatis</groupId>      <artifactId>ibatis-core</artifactId>      <version>3.0</version>    </dependency>

等它下载完,或者刷新一下maven 

 2.alt+enter可以import class

如图:

f70389fd81e34e3699ebc2ca3bced029.png

 它就不报红啦!

猜你喜欢

转载自blog.csdn.net/m0_70807708/article/details/126382584