Eureka 服务器客户端相关配置 1.建立eureka服务器 只需要使用@EnableEurekaServer注解就可以让应用变为Eureka服务器,这是因为spring boot封装了Eureka Server,让你可以嵌入到应用中直接使用.至于真正的EurekaServer是Netflix公司的开源项目,也是可以单独下载使用的 @SpringBootApplication @EnableEurekaServer public class EurekaServer { public stat…
Spring Cloud Netflix 是什么 This project provides Netflix OSS integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms. With a few simple annotations you can quickly enab…
工具:IntelliJ IDEA 2017.1.2 x64.maven3.3.9 打开IDE file===>new===>project next next 选择相应的依赖 next finish 查看下上述我们选的两个依赖在pom.xml中 通过@EnableEurekaServer注解启动一个服务注册中心 在默认情况下该服务注册中心会将自己作为客户端来尝试注册它自己,所以我们需要禁用它的客户端行为,只需在application.properties中做如下配置: # 指定服务的端口号s…