In Spring Cloud, how can you enable a service to register itself with Eureka Server?
- By annotating the service class with @EnableDiscoveryClient
- By configuring a YAML file with service registration details
- By manually adding the service to the Eureka dashboard
- By using a custom Java class to handle registration
To enable a service to register itself with Eureka Server in Spring Cloud, you can annotate the service class with @EnableDiscoveryClient. This annotation allows the service to participate in service discovery.
Loading...
Related Quiz
- What is the significance of using the spring.profiles.active property in the application properties or YAML file in Spring Boot?
- When creating a custom query in Spring Data JPA, the _____ annotation is used to modify the underlying query execution.
- To enable method-level security in Spring Security, the _____ annotation must be added to the configuration class.
- What is the primary purpose of the @SpringBootTest annotation in Spring Boot testing?
- How can you customize the UserDetailsService in Spring Security to load user information from a different source?