2017-02-23 34 views
0

我application.yml:使用Spring雲配置java.lang.IllegalStateException:沒有git的

server: 
    port: 8888 

eureka: 
    instance: 
    hostname: localhost 
    client: 
    registerWithEureka: true 
    fetchRegistry: true 
    serviceUrl: 
     defaultZone: http://localhost:8761/eureka/ 

spring: 
    cloud: 
    config: 
     server:[enter image description here][1] 
     git: 
      searchPaths: cloud-config-repo 
      uri: file:///E:/idea/spring-cloud-microservice-example-master/config-microservice/src/main/resources/configPath 
使用url時

http://localhost:8888/movie/default,i得到了misstake:java.lang.IllegalStateException:沒有git的在文件中: /// E:/ idea/spring-cloud-microservice-example-master/config -microservice/src/main/resources/configPath

+0

https://github.com/kbastani/spring-cloud-microservice-example 我只是使用這個例子 – feibabm

+0

也許它應該指向遠程存儲庫而不是本地目錄? :) –

+0

那麼,你有一個在指定文件夾的本地git回購? – Pear

回答

0

經過一段時間,我發現你應該在本地機器上爲這個目錄創建git倉庫:uri:file:/// E:/ idea/spring-cloud-microservice-example-master/config -microservice/src/main/resources/configPath

相關問題