关于org.springframework.web.bind.annotation.RequestMapping

仔细查看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.

检查是否漏掉了这个依赖,漏掉了的话先加上,然后再试试看。

1
2
3
4
5
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.1.6.RELEASE</version>
</dependency>

关于org.springframework.web.bind.annotation.RequestMapping

https://eucham.me/2018/08/03/fe10bf43c7bc.html

作者

遇寻

发布于

2018-08-03

更新于

2022-04-21

许可协议

评论