1. Common configuration of Eureka
Eureka Server edge
eureka.server.enable-self-preservation # Set to false to turn off self-preservation
eureka.server.eviction-interval-timer-in-ms # Cleaning interval (in milliseconds, default is 60*1000)
eureka.environment=dev #Specify the environment
eureka.datacenter=cloud specifies the data center
Eureka Client edge
eureka.client.healthcheck.enabled # Enable health check (requires spring-boot-starter-actuator dependency)
eureka.instance.lease-renewal-interval-in-seconds # Renewal update interval (default 30 seconds)
eureka.instance.lease-expiration-duration-in-seconds # Renewal expiration time (default 90 seconds)
eureka.instance.preferIpAddress=true
eureka.instance.instance-id=${spring.cloud.client.ipAddress}:${server.port} # Set the Instance ID to the form of IP:port
eureka.client.registerWithEureka=false # The eureka service does not need to register itself
eureka.client.fetchRegistry=false # #eureka service does not need to pull its own registration information
2. Use feign to integrate swagger
A timeout occurs when accessing the api interface, and the properties need to be modified:
#Inter-service call timeout
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=5000
3. Summary
The above parameter configurations are commonly used in the project. Through these parameter configurations, you can easily and clearly know which server is registered in the registry, and the default ones can be used for others, unless certain functions in the project must be modified.