spring-cloud Getting started with spring-cloud

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Remarks

This section provides an overview of what spring-cloud is, and why a developer might want to use it.

It should also mention any large subjects within spring-cloud, and link out to the related topics. Since the Documentation for spring-cloud is new, you may need to create initial versions of those related topics.

Getting started with Cloud Config: Client setup

To get started quickly you could use Spring Initializr to bootstrap your client. Add the Config Client to automatically generate a project with the needed dependencies.

Or you could add the dependency manually to an existing Spring Cloud application.

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

Once the dependency is on the classpath Spring Cloud will try to connect to a Config Server on localhost to retrieve the configuration.

Getting started with Cloud Config: Server setup

To externalise a distributed systems configuration Spring Cloud Config provides server and client-side support needed for externalising and centralising your configuration.

To get started quickly you could use Spring Initializr to bootstrap your server. Add the Config Server dependency to automatically generate a project with the needed dependencies.

Or you could add the dependency manually to an existing Spring Cloud application.

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-config-server</artifactId>
</dependency>
 

By default you can use a Git repository to store you configuration. Defined in :

spring.cloud.config.server.git.uri: file://${user.home}/config-repo
 

The default port to run a config server on is 8888.

server.port: 8888
 

To enable the config server the application starting class needs to be annotated with @EnableConfigServer .



Got any spring-cloud Question?