1

I have one java spring boot library and it is using some configuration as below using zookeeper address for loadbalancer.

<user:registry regProtocol="zookeeper" name="testZk" address="${zookeeper.address}"/> 

zookeeper.address will be different between development and production environments.

Users of this library can include zookeeper.address in their cloud config properties based on the environment but are there other ways so that library users don't need to include these in their properties and library in some way use different properties based on environment from user.

2 Answers 2

1

Serving Plain Text will resolve above problem.

http://cloud.spring.io/spring-cloud-static/spring-cloud-config/2.0.0.M5/single/spring-cloud-config.html#_serving_plain_text

Just define multiple environments, you wish to in application properties and on the user side activate the properties, it will work.

Sign up to request clarification or add additional context in comments.

Comments

0

I'm pretty new with java but I think that they could use an application.properties file to overwrite any environmental properties.

application.properties in spring

1 Comment

Yeah ,you are kind of correct but even using application properties, i wanted to separate configuration between environments.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.