好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

spring无法引入注解及import org.springframework.web.bind.a

本文主要介绍了spring无法引入注解及import org.springframework.web.bind.annotation.*报错的解决,具体如下:

如图所示,spring的注解报红,无法引入包,推测是spring-web和spring-webmvc这两个包的问题,去看pom.xml,

显示没有问题

进入maven库,两个包都存在

那么,问题在哪里呢?

扫了一眼project里面的External libraries,发现并没有spring-web和spring-webmvc,尝试手动添加

找到maven库里面的包

添加到对应的模块

添加成功

注意:选择的时候要选择到包里面的jar文件。

 到此这篇关于spring无法引入注解及import org.springframework.web.bind.annotation.*报错的解决的文章就介绍到这了,更多相关spring无法引入注解内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!

原文链接:https://blog.csdn.net/m0_37619183/article/details/104638337

查看更多关于spring无法引入注解及import org.springframework.web.bind.a的详细内容...

  阅读:23次