What dependency is missing for org.springframework

2020-02-21 03:49发布

What dependency am I missing? I am currently using:

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    <version>3.0.5.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>3.0.5.RELEASE</version>
</dependency>

The error Im getting is: The import org.springframework.web.bind cannot be resolved

14条回答
▲ chillily
2楼-- · 2020-02-21 04:46

I was using spring-web version 4.3.7

Changing it to a working 4.1.7 immediately solved it.

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>4.1.7.RELEASE</version>
    </dependency>
查看更多
Lonely孤独者°
3楼-- · 2020-02-21 04:46

Go to pom.xml

Add this Dependency :

   <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>4.1.6.RELEASE</version>
    </dependency>

using command prompt, find your folder: - mvn clean

查看更多
登录 后发表回答