For me, this happens to Maven and Eclipse / STS whenever I update my IDE or import an existing Maven project. Go to the "Problems" tab ( Window → Show view → Problems ) and see what is written there. Recently, the Problems tab showed Project configuration is not up-to-date ...
and suggested using Maven to update my project configuration, and this solved the red X problem. To do this, in the "Project Explorer" view, open the context menu and select Maven → Update Project , as shown in the following screenshot:
Lance Kind May 31 '16 at 14:32 2016-05-31 14:32
source share