Spring Boot @ RequestMapping cannot find dependency (underlying problem)

as in the title, no dependency was found when using @ RequestMapping.
older versions introduced the web package with " spring-boot-starter-web < / artifactId >", and
also introduced spring-boot-starter-data-jpa < / artifactId >, which is not easy to use.

how to introduce it now?

part of the pom.xml code is as follows:

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.5.RELEASE</version>
    </parent>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
    </dependencies>
Aug.04,2021

should be after adding the following code, mouse over @ RequestMapping, there will be ADD. Path.

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

No web starter dependency

Menu