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

版权声明:本文为博主原创文章,转载请联系作者并注明出处 https://blog.csdn.net/asahinokawa/article/details/81358227

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

猜你喜欢

转载自blog.csdn.net/asahinokawa/article/details/81358227