简体   繁体   中英

Spring Cloud git configuration -- placing repository in folder directly containing the classpath?

I want to place the git repository in a folder directly above the classpath during the development stage of an application.

Currently, I have this as my Spring Cloud git URI:

spring.cloud.config.server.git.uri=file://${user.dir}/cloud-configuration-repository

This URI points to a folder directly above the classpath.

I get this error, however, during runtime.

***************************
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.

Edit: here is the project structure that I wish to have:

Project
├── _.idea
├── src
|   ├── main
|   └── test
├── target
└── cloud-configuration-repository

I want to place the git repository in a folder directly above the classpath during the development stage of an application.

Currently, I have this as my Spring Cloud git URI:

spring.cloud.config.server.git.uri=file://${user.dir}/cloud-configuration-repository

This URI points to a folder directly above the classpath.

I get this error, however, during runtime.

***************************
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.

Edit: here is the project structure that I wish to have:

Project
├── _.idea
├── src
|   ├── main
|   └── test
├── target
└── cloud-configuration-repository

I want to place the git repository in a folder directly above the classpath during the development stage of an application.

Currently, I have this as my Spring Cloud git URI:

spring.cloud.config.server.git.uri=file://${user.dir}/cloud-configuration-repository

This URI points to a folder directly above the classpath.

I get this error, however, during runtime.

***************************
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.

Edit: here is the project structure that I wish to have:

Project
├── _.idea
├── src
|   ├── main
|   └── test
├── target
└── cloud-configuration-repository

I want to place the git repository in a folder directly above the classpath during the development stage of an application.

Currently, I have this as my Spring Cloud git URI:

spring.cloud.config.server.git.uri=file://${user.dir}/cloud-configuration-repository

This URI points to a folder directly above the classpath.

I get this error, however, during runtime.

***************************
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.

Edit: here is the project structure that I wish to have:

Project
├── _.idea
├── src
|   ├── main
|   └── test
├── target
└── cloud-configuration-repository

I had the same problem, I solved it by renaming the bootstrap.yml file to application.yml.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM