From the course: Spring Cloud: Cloud-Native Architecture and Distributed Systems
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Registering with Eureka - Spring Tutorial
From the course: Spring Cloud: Cloud-Native Architecture and Distributed Systems
Registering with Eureka
- [Instructor] Now that we have a discovery service set up, let's register our first service to it so that we can expose it to our entire microservices system. Let's jump back into our IDE and I want you to go to the room service and open up the palm.xml file. Now in here we're going to add a dependency. And the dependency that we are going to add is spring cloud starter netflix eureka client from org.spring framework.cloud. We'll let Maven bring that dependency down. And now I want you to open up source main Java and your application.services class. And in here we're going to do an at enable discovery client. And because we are using our default port for our discovery client, that's it. Now, if we needed to configure it, if it was truly a remote system, we would have to put properties in the application at properties filed to consume it. But for now, this is it. So what we're going to do is we're going to restart…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Service discovery1m 47s
-
(Locked)
Setting up Eureka2m 35s
-
(Locked)
Registering with Eureka2m 20s
-
(Locked)
Challenge: Service discovery48s
-
(Locked)
Solution: Service discovery1m 16s
-
(Locked)
Consuming services3m 13s
-
(Locked)
Consuming with OpenFeign5m 18s
-
(Locked)
Challenge: OpenFeign40s
-
(Locked)
Solution: OpenFeign2m 21s
-
(Locked)
-
-