Adding the Maven dependencies configuration

To implement Eureka Client in your project, include the Spring Cloud Starter with the org.springframework.cloud group and the id spring-cloud-starter-netflix-eureka-client artifact. Also include spring-boot-starter-web in pom.xml and implement a REST controller to create a simple REST service to be registered with the Eureka Discovery Server. Let's see the following Maven configuration file:

<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.2.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> ...

Get Mastering Spring Boot 2.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.