spring cloud中启动Eureka Server
来源:互联网 发布:知中 民谣啊民谣 编辑:程序博客网 时间:2024/06/04 17:59
一、新建工程
二、工程结构
三、修改配置文件
# eureka.client.registerWithEureka :表示是否将自己注册到Eureka Server,默认为true。由于当前这个应用就是Eureka Server,故而设为false# eureka.client.fetchRegistry :表示是否从Eureka Server获取注册信息,默认为true。因为这是一个单点的Eureka Server,不需要同步其他的Eureka Server节点的数据,故而设为false。# eureka.client.serviceUrl.defaultZone :设置与Eureka Server交互的地址,查询服务和注册服务都需要依赖这个地址。默认是http://localhost:8761/eureka ;多个地址可使用 , 分隔。server: port: 8761eureka: client: register-with-eureka: false fetch-registry: false service-url: defaultZone: http://localhost:8761/eureka // Eureka Server注册服务的地址四、添加开启Eureka Server注解
package com.chhliu.springcloud.eureka;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;@SpringBootApplication@EnableEurekaServer // 注解支持public class SpringcloudEurekaApplication {public static void main(String[] args) {SpringApplication.run(SpringcloudEurekaApplication.class, args);}}五、验证
在浏览器中输入http://localhost:8761/地址,就可以看到Eureka Server的注册页面了
通过上面的几个步骤,单机版的Eureka Server就成功的启动了!
0 0
- spring cloud中启动Eureka Server
- 【Spring Cloud】一、Eureka Server 服务注册中心服务端启动
- spring cloud 之eureka-server
- spring cloud eureka server HA
- spring cloud eureka server 配置
- spring cloud eureka-server搭建
- Spring Cloud Eureka Server HA With Docker
- spring cloud之Eureka Server环境搭建
- spring cloud eureka server warning EUREKA MAY BE INCORRECTLY
- spring cloud 的启动Eureka client报错--Cannot execute request on any known server
- spring-cloud-eureka-server 注册中心启动不显示页面而是xml问题
- spring cloud 的启动Eureka client报错--Cannot execute request on any known server
- Spring Cloud中,Eureka常见问题总结
- Spring Cloud中,Eureka常见问题总结
- Spring Cloud中,Eureka常见问题总结
- Spring Cloud中Eureka开启密码认证
- Spring Cloud中,Eureka常见问题总结
- Spring Cloud中,Eureka常见问题总结
- 图:最少转机
- 凯撒密码的简单改进
- linux 只获取dns服务器地址
- yum安装(卸载)本地rpm包
- JSON学习笔记
- spring cloud中启动Eureka Server
- 移动APP用户行为分析
- 设置Redhat7的启动级别
- Android之利用Handler消息机制实现Activity与TabActivity的互动
- 51Nod - 1483 暴力
- java后端的测试工具整理
- android 多渠道打包
- HTML5上传图片预览
- globus-stop-container授权问题