Spring Boot Eureka Server (service registry) for the Fittrack microservices.
This service runs a Netflix Eureka registry so other services can register themselves and discover each other.
- Java 21
- Spring Boot 4.0.x
- Spring Cloud Netflix Eureka Server (Spring Cloud 2025.1.x)
- Maven
- Starts a Eureka Server on port 8761.
- Does not register itself with Eureka and does not fetch the registry (server-only mode).
- Maven coordinates:
com.fittrack:eureka:0.0.1-SNAPSHOT - Spring application name:
Fittrack-eureka-service - Base package:
com.fittrack.eureka
- JDK 21 installed and
JAVA_HOMEset. - Maven wrapper is included (
mvnw/mvnw.cmd), so you don’t need to install Maven globally.
Main config file: src/main/resources/application.yaml
Current defaults:
server.port:8761spring.application.name:Fittrack-eureka-serviceeureka.client.register-with-eureka:falseeureka.client.fetch-registry:false
You can override settings with environment variables or command-line arguments.
Examples:
- Change port:
--server.port=8762
# from the repo root
.\mvnw.cmd spring-boot:runThen open:
- Eureka dashboard: http://localhost:8761/
- Eureka endpoints: http://localhost:8761/eureka/
.\mvnw.cmd clean testBuild the JAR:
.\mvnw.cmd clean packageThe JAR will be created under target/.
In another Spring Boot service that should register with Eureka, add the Eureka client dependency and configure the Eureka URL.
Typical application config:
eureka.client.service-url.defaultZone:http://localhost:8761/eureka/
Once the client service is running, it should appear on the Eureka dashboard.
Start the server on another port:
.\mvnw.cmd spring-boot:run -Dspring-boot.run.arguments="--server.port=8762"You may see a log warning about a missing Bean Validation provider. For a basic Eureka server, this is usually not critical. If you want to remove it, add a validation provider (e.g., Hibernate Validator) to the classpath.
- Spring Cloud Netflix Eureka Server: https://docs.spring.io/spring-cloud-netflix/reference/spring-cloud-netflix.html#spring-cloud-eureka-server
- Service registration guide: https://spring.io/guides/gs/service-registration-and-discovery/