我正在学习Spring Cloud &使用spring版本2.4.3和spring-cloud-version
2020.0.1和我创建了两个属性文件
application.yml
spring:
application:
name: cloud-server
server:
port: 8888bootstrap.yml
spring:
cloud:
config:
server:
git:
uri: https://github.com/************/insurance-config-server
default-label: main 但我还是得到了以下错误
***************************
APPLICATION FAILED TO START
***************************
Description:
Invalid config server configuration.
Action:
If you are using the git profile, you need to set a Git URI in your configuration. If you are using a native profile and have spring.cloud.config.server.bootstrap=true, you need to use a composite configuration.如何解决这种错误?
发布于 2021-06-15 10:39:12
你有bootstrap.yml文件吗?
我也有同样的问题。我的项目没有bootstrap.yml,但我在IDEA启动配置中指定了一个开发活动文件,这导致了与您相同的错误。启动时找不到错误bootstrap.yml。删除IDEA启动配置中的dev后,即可正常启动。
发布于 2021-08-20 12:13:03
如果您正在遵循您参考的书中的示例,那么我建议您将此
spring:
cloud:
config:
server:
git:
uri: https://github.com/************/insurance-config-server
default-label: main 转到application.yml
这就是我所做的,它对我很有效。
https://stackoverflow.com/questions/66690015
复制相似问题