今天写springboot项目,在写controller层的时候,突然发现@RequestMapping等等一些注解不能用了,手打也不好使,我当时就感觉是maven的问题,到文件中查看了一下,果然没有 spring-boot-starter-web 这个jar包,然后在中添加就可以了
<dependency>
<groupId></groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
这是我在日常撸码中遇到的错误,希望能够帮助到大家!