仔细查看maven构建的输入日志后,发现是因为在这个org.springframework.web.bind.annotation
包没有导入成功。要怎么才能导入这个包?后面再Stack Overflow上找到一个回答,成功地解决了问题。回答如下:

I had the same problem. After spending hours, I came across the solution that
I already added dependency for “spring-webmvc” but missed for “spring-web”. So
just add the below dependency to resolve this issue. If you already have, just
update both to the latest version. It will work for sure.

检查是否漏掉了这个依赖,漏掉了的话先加上,然后再试试看。
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</
artifactId> <version>4.1.6.RELEASE</version> </dependency>

友情链接
KaDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:[email protected]
QQ群:637538335
关注微信