spring 配置服务器 - 用于本地 git 存储库 [英] spring config server- for local git repository

查看:77
本文介绍了spring 配置服务器 - 用于本地 git 存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置 spring cloud 配置服务器

I'm trying to setting up spring cloud config server

-在本地创建 git 存储库文件夹F:\git-local-repository\repository

-Created git repository folder on my local F:\git-local-repository\repository

-使用类路径链接源链接它-为我的服务添加了属性文件

-linked it using class path link source -Added property file for my service

-在 F:\git-local-repository\repository 提交我的更改后

-After committing my changes on location F:\git-local-repository\repository

-hitting url : http://localhost:8888/limits/default

-hitting url : http://localhost:8888/limits/default

导致错误:org.springframework.cloud.config.server.environment.NoSuchLabelException:没有这样的标签:master

result in error : org.springframework.cloud.config.server.environment.NoSuchLabelException: No such label: master

Caused by: org.eclipse.jgit.api.errors.RefNotFoundException: Ref master 无法解析

Caused by: org.eclipse.jgit.api.errors.RefNotFoundException: Ref master cannot be resolved

以下是我的spring boot应用的主要类

Following is my main class of spring boot application

@EnableConfigServer


@SpringBootApplication
public class SpringCloudConfigServerApplication {

public static void main(String[] args) {
    SpringApplication.run(SpringCloudConfigServerApplication.class, args);


}

}

application.properties

spring.application.name=spring-cloud-config-server

server.port=8888

spring.cloud.config.server.git.uri=file:////F:/git-local- 
repository/repository

预期结果:将显示应用程序属性详细信息和其他 url

expected result: will be showing application property details and other url's

推荐答案

问题在于额外的正斜杠.请改成这样:

The issue is with extra forward slash. Please change to this :

spring.cloud.config.server.git.uri=file:///F:/git-local- 
repository/repository

这篇关于spring 配置服务器 - 用于本地 git 存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆