fei*_*abm 2 cloud spring config
我的应用程序.yml:
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
Run Code Online (Sandbox Code Playgroud)
使用 url 时:http://localhost:8888/movie/default,我得到了错误:java.lang.IllegalStateException: No .git at file:///E:/idea/spring-cloud-microservice-example- master/config-microservice/src/main/resources/configPath
几天后,我发现您应该在本地机器中为此目录创建 git 存储库:uri: file:///E:/idea/spring-cloud-microservice-example-master/config-microservice/src/main/resources/配置路径