spring-guides / gs-spring-boot

Building an Application with Spring Boot :: Learn how to build an application with minimal configuration.
https://spring.io/guides/gs/spring-boot/
Apache License 2.0
890 stars 4.51k forks source link

Failed to Resolve Classpath #41

Closed quinise closed 4 years ago

quinise commented 6 years ago

I followed the directions on https://code.visualstudio.com/docs/java/java-tutorial but every time I try to run the project I get a "Failed to Resolve Classpath" error. I'm running this on a mac 10.13.2, and using Visual Studio Version 1.19.3.What step am I missing?

tossb99 commented 6 years ago

Not sure what error you are seeing - but I am seeing an issue where it is unable to find the servlet api

Added this and seemed get past the compile:

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>javax.servlet-api</artifactId>
    <version>3.1.0</version>
    <scope>provided</scope>
</dependency>
Amirroracle commented 6 years ago

Having the same issue, that vscode tutorial appears to be out of date

mtnygard commented 5 years ago

This error also occurs when using Java 11, because the tutorial refers to a somewhat older version of Gradle (4.6) that does not recognize Java 11 as a valid version.

I updated the gradle-wrapper.properties files under both initial and complete and was able to resolve the classpath within VS Code.

dsyer commented 4 years ago

Seems to be obsolete. All working for me in VSCode.