maven具體報錯提示如下:
Description Resource Path Location Type
ArtifactDescriptorException: Failed to read artifact descriptor for org.springframework.boot:spring-boot-starter-thymeleaf:jar:1.5.10.RELEASE: ArtifactResolutionException: Failure to transfer org.springframework.boot:spring-boot-starter-thymeleaf:pom:1.5.10.RELEASE 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 org.springframework.boot:spring-boot-starter-thymeleaf:pom:1.5.10.RELEASE from/to central (http://repo.maven.apache.org/maven2): connect timed out pom.xml /hello-springboot line 1 Maven Dependency Problem
經發現:
spring-boot-starter-thymeleaf未下載完全,所以需要先刪除后更新。
刪除前:
刪除更新后:
經對比,明顯發現之前確實出現了下載中斷問題。
問題原因:
springboot后台無法直接訪問html,采用thymeleaf出現maven報錯,誤以為spring-boot里面已經有thymeleaf。但不加入thymeleaf依賴無法訪問,springboot
從1.5.10切換到1.4.7可以順利加thymeleaf依賴。后經maven錯誤提示定位問題錯誤:
調整后,順利訪問html頁面: