eruke注册中心搭建
2019独角兽企业重金招聘Python工程师标准>>>
eruke注册中心搭建
配置pom.xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>1.0.7.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka-server</artifactId>
</dependency>
<!--表示为web工程-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--暴露各种指标-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
配置properties.
取消其客户端的属性,只作为服务端
server:
port: 8761
eureka:
instance:
hostname: localhost
client:
registerWithEureka: false
fetchRegistry: false
serviceUrl:
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
配置启动类
/**
* eureka-server
* @author WangD
*
*/
@EnableEurekaServer
@SpringBootApplication
public class CloudAplication {
/** 开启程序 */
public static void main(String[] args) {
SpringApplication.run(CloudAplication.class, args);
}
}
修改其注册服务中心界面
将其jar包里面的templete模板和js,images服务放入自己的resources下面自定义修改ftl模板
发布服务运行供其他客户端注册服务
转载于:https://my.oschina.net/demons99/blog/1947521
eruke注册中心搭建相关推荐
- Linux-Nacos-服务注册中心搭建
Linux-Nacos-服务注册中心搭建 由于springcloud 注册中心 Eureka 早已停止维护所以我们使用Nacos 官方: https://nacos.io/zh-cn/docs/wha ...
- eureka注册中心搭建与使用
soringcloud是目前比较流行的微服务治理框架之一,其自身提供了一套完善的分布式服务治理方案,本篇先简单分享一下springcloud的第一个组件,服务注册中心 -- eureka eueka按 ...
- 基于Eureka服务治理的高可用性注册中心搭建
高可用注册中心 在微服务这样的分布式环境中,我们需要充分考虑故障发生的情况,所以在生产环境中必须对各个组件进行高可用部署,对于微服务如此,对于微服务注册中心也是一样.上一篇文章我们搭建了单节点的服务治 ...
- SpringBoot2.1+SpringCloud:注册中心搭建(Eureka)
一.版本说明: SpringBoot:2.1.6.RELEASE SpringCloud:Greenwich.RELEASE 二.作用及功能说明: 注册中心:是将多个微服务统计进行管理,主要起注册及发 ...
- SpringCloud——Eureka注册中心搭建
Eureka原理 eureka来源于古希腊词汇,意为"发现了" eureka分为两部分,Server端和Client端 Register 服务注册 想要参与服务注册发现的实例首先需 ...
- springboot2 springcloud Greenwich.SR3 构建微服务--1.eureka注册中心搭建
本一系列springcloud的文章主主要讲应用, 也会涉及到一些原理的讲解. 写了几句自己这段时间看书,总结的微服务的东西送给你们 : 道为源,源分多支为术,如龙生九子,九子各不同,然皆为龙也. 凡 ...
- 用ZooKeeper做为注册中心搭建基于Spring Cloud实现服务注册与发现
前提: 先安装好ZooKeeper的环境,搭建参考:http://www.cnblogs.com/EasonJim/p/7482961.html 说明: 可以再简单的理解为有两方协作,一个是服务提供这 ...
- Eureka 微服务注册中心搭建
本机IP为 192.168.1.102 1. 新建Maven项目 eureka 2. pom.xml <project xmlns="http://maven.apach ...
- eureka注册中心HA集群搭建
今天我们讲一下高可用的eureka注册中心(eureka server cluster) SpringCloud支持Eureka.Zookeeper.Consul作为注册中心,这里我们选择Eureka ...
最新文章
- 商汤及联合实验室入选论文重点解读 | ECCV 2018
- python【数据结构与算法】内置函数enumerate(枚举) 函数(看不懂你来打我)
- 合并DateFrame之—— append()
- boost::hana::length用法的测试程序
- OAuth2.0学习(1-9)新浪开放平台微博认证-web应用授权(授权码方式)
- apache madlib 教程_Apache顶级开源项目——机器学习库MADlib简介与应用实例
- 尝试将WCF映射到Java术语
- Java解析JSON文件
- 動態修改SiteMapPath路徑
- Android studio下载安装使用遇到的问题及解决办法
- 玩转jquery插件之flexigrid 【转】
- PyCharm——搜索功能的学习笔记
- python读取配置文件获取所有键值对_Python读取properties配置文件操作示例
- Java编程:栈的应用实例——简单的综合计算器实现(中缀表达式)
- java.lang.UnsupportedOperationException WebView is not allowed in privileged processes
- hostname hostnamectl 显示、设置主机名
- 台电tbook10s官方固件_台电Tbook10S线刷包_台电Tbook10S刷机包_台电Tbook10S固件包_台电Tbook10S救砖包 - 线刷宝ROM中心...
- IDEA:Cannot determine Java VM executable in selected JDK
- 北京某数据中心全年用水量分析
- vue-pdf 通过文件流预览pdf文件
热门文章
- 一文全览,AAAI 2020上的知识图谱
- 避免神经网络过拟合的5种技术
- 美国防部用AI消除“战争迷雾”,机器人、无人机全上阵
- 马斯克炮轰元宇宙与Web3.0:“我不觉得有人会成天把屏幕绑在脑袋上”
- 什么是1+N模式的新一代城市大脑建设方案
- 当法律纽带变成“机器红线”,能让自动驾驶汽车更安全吗?
- 重磅!脑机接口突破登Nature封面,脑中“笔迹”转屏幕文字破纪录,准确率超99%...
- 量子计算和量子模拟研究获进展
- 收藏!中国卫星互联网产业发展白皮书
- AI初创公司都去哪了?2019年科技公司“五巨头”收购盘点