springboot+maven pom檔案保錯問題
阿新 • • 發佈:2019-02-03
今天閒來無事,自己搭了一個springboot+maven框架,可搭建後,pom檔案一直報錯報錯如下:
Project build error: Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:1.5.8.RELEASE from https://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 org.springframework.boot:spring-boot-starter-parent:pom:1.5.8.RELEASE from/to central (https://repo.maven.apache.org/maven2):
connect timed out and 'parent.relativePath' points at wrong local POM
經過仔細排查 發現只需改成這樣就行:
需要注意的是:有時會提示
spring-boot-starter-test包不存在,然後編譯器也無法下載,這時可以去maven倉庫看看這個包對應的版本號,修改即可