Skip to content

sample spring eureka discovery-server , client and service sample

License

Notifications You must be signed in to change notification settings

dulipchandana/eureka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eureka sample configuration in spring boot.
https://app.pluralsight.com/player?course=spring-cloud-fundamentals&author=dustin-schultz&name=spring-cloud-fundamentals-m2&clip=5&mode=live

1.this project contain dicovery server , service and , client sample 

2.discovery server clustering also included 

3.following issues also addressed . 
spring-cloud/spring-cloud-netflix#838

https://stackoverflow.com/questions/33921557/understanding-spring-cloud-eureka-server-self-preservation-and-renew-threshold

--make a spring boot application with start.spring.io

http://start.spring.io/

group:package name
Artifact : service
dependancies : Eureka Discovery

#enable discovery client 
@EnableDiscoveryClient //enable Discovery client
@SpringBootApplication
@RestControler
public class ServiceApplication{

#access run argument from application

@Value("${service.instance.name}")
private String instance;

#application.property changes

spring.application.name=service //application name 
eureka.client.service-erldefaultZone=http://localhost:8761/eureka //euraca location 


#give argument in spring boot startup in Override properties

server.port=8081
service.instance.name=instance1


#--eureka server configuration and initialisation with spring cloud ---

http://start.spring.io/
Group = io.eureka.com
Artifact=discovery-server
Dependencies= Eureka Server,DevTools,Actuator

@EnableEurekaServer //eureka server 
@SpringBootApplication
public class DiscoveryServerApplication {

#in application.property

spring.application.name=discovery-server
eureka.client.register-with-eureka=false // register in 
eureka.client.fetchch-registry = false // indicates weather this client should fetch eureka registry information from eureka server.
server.port = 8761






About

sample spring eureka discovery-server , client and service sample

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages