我正在尝试这里解释的 Spring REST 示例。项目源代码在这里。
我解压缩文件并将顶部文件夹重命名为“myproject”,并将其作为现有的 maven 项目导入 eclipse。但是,观察到由于缺少弹簧罐而导致的许多编译问题。我想这是因为 maven 无法导入这些 jar。当我检查 pom.xml 时,我看到 eclipse 抱怨以下错误:
ArtifactDescriptorException: Failed to read artifact descriptor for com.fasterxml.jackson.core:jackson-databind:jar:2.2.2: ArtifactResolutionException: Failure to transfer com.fasterxml.jackson.core:jackson-databind:pom:2.2.2 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact com.fasterxml.jackson.core:jackson-databind:pom:2.2.2 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.2.2/jackson-databind-2.2.2.pom
和
ArtifactDescriptorException: Failed to read artifact descriptor for com.fasterxml.jackson.core:jackson-databind:jar:2.2.2: ArtifactResolutionException: Failure to transfer com.fasterxml.jackson.core:jackson-databind:pom:2.2.2 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact com.fasterxml.jackson.core:jackson-databind:pom:2.2.2 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.2.2/jackson-databind-2.2.2.pom
我是新手,所以在这里苦苦挣扎。请帮助我如何解决它。
谢谢你。