Skip to content

Spring Boot-based Service Registry application that integrates with Consul for microservice discovery and registration. It dynamically loads configuration from environment variables to support flexible deployment and service management in microservice architectures.

Notifications You must be signed in to change notification settings

sp-muramutsa/registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Service Registry

A Spring Boot application serving as a Service Registry using Consul for microservice discovery and registration. It loads configuration dynamically from environment variables defined in a .env file.

Features

  • Loads environment variables with io.github.cdimascio.dotenv.Dotenv.
  • Configures Spring Boot application properties dynamically:
    • Application name
    • Consul host and port for service registry
    • Server port for this registry service
  • Integrates with Consul for microservices service discovery.

Prerequisites

  • Java 17+ (compatible with your Spring Boot version)
  • Maven for build and run
  • A running Consul instance for service registry
  • .env file with necessary environment variables

Environment Variables

Example .env file:

SPRING_APPLICATION_NAME=service-registry
SPRING_CLOUD_CONSUL_HOST=localhost
SPRING_CLOUD_CONSUL_PORT=8500
SERVER_PORT=8761

Adjust these values based on your environment.

Build & Run

Build the project with Maven:

mvn clean install

Run the application:

mvn spring-boot:run

or

java -jar target/registry-0.0.1-SNAPSHOT.jar

About

Spring Boot-based Service Registry application that integrates with Consul for microservice discovery and registration. It dynamically loads configuration from environment variables to support flexible deployment and service management in microservice architectures.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages