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

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…

Contents