Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 5 Spring cloud config server native configuration is not working. #14

Open
wangzt568 opened this issue Dec 2, 2020 · 8 comments

Comments

@wangzt568
Copy link

Error description: 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. I have tried other ways like composite. But still not working. Could you help me with this issue?

@Will-Estes
Copy link

Add to your POM. This fixed mine.

		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-bootstrap</artifactId>
		</dependency>

@hannah23280
Copy link

Add to your POM. This fixed mine.

		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-bootstrap</artifactId>
		</dependency>

Hi, i encounter same issue, but have not yet try your solution. Any idea why adding spring-cloud-starter-bootstrap would solve the problem? I read online articles, but none mention about using bootstrap

@hannah23280
Copy link

Add to your POM. This fixed mine.

		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-bootstrap</artifactId>
		</dependency>

Hi, i encounter same issue, but have not yet try your solution. Any idea why adding spring-cloud-starter-bootstrap would solve the problem? I read online articles, but none mention about using bootstrap

Think i know why, it is needed for bootstrap.yml to work

@Will-Estes
Copy link

@hanct That's correct, I think the spring team removed the bootstrap dependency from the starter dependencies. So you need to include it separately now.

@duydoanx
Copy link

duydoanx commented Jan 5, 2022

You can see the answer here: https://stackoverflow.com/a/65009480

@AnshuSoni
Copy link

For me, adding , spring-cloud-starter-bootstrap dependency did not work, but when I have put same configuration in application.properties, it started working. Is it fine ?

@Will-Estes
Copy link

For me, adding , spring-cloud-starter-bootstrap dependency did not work, but when I have put same configuration in application.properties, it started working. Is it fine ?

Since bootstrap has been deprecated for newer versions of Spring, I think putting it in the application.properties is fine. Check out this StackOverflow (as posted earlier by duydoanx)

@Alphabtw00
Copy link

For me, adding , spring-cloud-starter-bootstrap dependency did not work, but when I have put same configuration in application.properties, it started working. Is it fine ?

Since bootstrap has been deprecated for newer versions of Spring, I think putting it in the application.properties is fine. Check out this StackOverflow (as posted earlier by duydoanx)

is it? im still using it and without that dependency bootstrap.properties wont work but with it it works. using spring boot 3.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants