If the @ restcontroller annotation can’t recognize the red, the reason is that there is no web dependency added to the POM file.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
If a web dependency is added or an error is reported, it may be that there is no specified version number, so Maven can’t recognize
the solution is to enter the pom.xml file, click this location, find the dependency with the corresponding version number, replace the original dependency and import it again
Read More:
- Solution to the error of @ resource annotation in eclipse spring
- Error in @ param in idea2017.3.4 / * * / annotation
- The @ Autowired annotation in springboot is invalid in ordinary classes. How to solve and use the null pointer exception java.lang.nullpointerexception
- @Solution to get / set error in eclipse after using data annotation
- Notes on @ pathvariable annotation in springcloud openfeign
- Jsonformat annotation solves the problem of time format in the front end of localdatetime
- The solution of using Autowired annotation to report errors in IntelliJ idea
- NoClassDefFoundError: org.springframework.validation.annotation.ValidationAnnotationUtils
- [idea] error occurred when using @ data annotation in Lombok: no related get / set method was found
- Springboot plus cross domain annotation @crossorigin startup error
- Error pathvariable annotation was empty on param 0 when migrating idea to eclipse
- Solution of idea using @ Autowired annotation to report errors
- Error: package android.support.annotation Does not exist
- Error creating bean with name ‘org.springframework.security.oauth2.config.annotation.web.configurati
- IntelliJ idea / eclipse automatically generate author annotation signature
- @How to solve eclipse error after setter and @ getter (@ data) annotation
- DB2 table annotation pull
- Eclipse reset annotation shortcuts
- The MAC compiler Doris reported an error that thrift.annotation does not exist
- Solve the slanting problem of vscode one dark Pro topic annotation