【Java / SpringBoot】package org.springframework.web.bind.annotation does not exist even though it's defined in POM

MavenのSpringBootプロジェクトをdockerで立ち上げようとした時に以下のようなエラーが発生した。

package org.springframework.web.bind.annotation does not exist even though it's defined in POM

以下のページ内を参考に、

stackoverflow.com

pom.xmlに以下のspring-boot-starter-webを追記

(変更前)

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

(変更後)

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

無事解消された模様。以上