当前位置: 首页 > news >正文

如何在自己做的网站中顶置内容友情链接平台广告

如何在自己做的网站中顶置内容,友情链接平台广告,做网站维护需要多少钱,wordpress 提供了 支持全部代码发出来了 搭建服务提供者 步骤: 1.创建项目,引入依赖 2.添加Eureka相关配置 3.添加EnableEurekaClient注解 4.测试运行 步骤1:创建项目,引入依赖 使用Spring Initializr方式创建一个名称为eureka-provider的Sprin…

全部代码发出来了

搭建服务提供者

步骤:

1.创建项目,引入依赖

2.添加Eureka相关配置

3.添加@EnableEurekaClient注解

4.测试运行

步骤1:创建项目,引入依赖

使用Spring Initializr方式创建一个名称为eureka-provider的Spring Boot项目,这里将Group命名为com.bushuo,将Artifact命名为eureka-provider,在pom.xml文件中添加Web、Eureka Client依赖。

在pom文件中添加的Eureka Client、Web依赖如下:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.0.6.RELEASE</version><relativePath/> <!-- lookup parent from repository --></parent><groupId>com.bushuo</groupId><artifactId>eureka-provider</artifactId><version>0.0.1-SNAPSHOT</version><name>eureka-provider</name><description>Demo project for Spring Boot</description><url/><licenses><license/></licenses><developers><developer/></developers><scm><connection/><developerConnection/><tag/><url/></scm><properties><java.version>1.8</java.version></properties><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-eureka-client</artifactId></dependency><dependency><groupId>org.testng</groupId><artifactId>testng</artifactId><version>6.9.10</version><scope>test</scope></dependency><dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter-api</artifactId><scope>test</scope></dependency></dependencies><dependencyManagement><dependencies><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>Finchley.SR2</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins></build></project>

在这里插入图片描述
在这里插入图片描述

步骤2:添加Eureka的相关配置

在全局配置文件application.yml中添加Eureka的相关配置信息。
在这里插入图片描述

步骤3:在项目启动类添加@EnableEurekaClient注解

在项目启动类EurekaProviderApplication上添加@EnableEurekaClient注解开启Eureka Client功能。
在这里插入图片描述

步骤4:测试运行

两个项目都要启动

启动eureka-provider项目,

在浏览器中访问http://localhost:7071,观察注册列表变化。

在这里插入图片描述

搭建服务消费者

步骤:

1.创建项目,引入依赖

2.添加Eureka相关配置

3.添加@EnableEurekaClient注解

4.测试运行

步骤1:创建项目,引入依赖

使用Spring Initializr方式创建一个名称为eureka-consumer的Spring Boot项目,这里将Group命名为com.bushuo,将Artifact命名为eureka-consumer,添加Web、Eureka Client依赖。详细内容同搭建服务提供者。

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.0.6.RELEASE</version><relativePath/> <!-- lookup parent from repository --></parent><groupId>com.bushuo</groupId><artifactId>eureka-consumer</artifactId><version>0.0.1-SNAPSHOT</version><name>eureka-consumer</name><description>Demo project for Spring Boot</description><url/><licenses><license/></licenses><developers><developer/></developers><scm><connection/><developerConnection/><tag/><url/></scm><properties><java.version>1.8</java.version></properties><!-- 依赖管理 --><dependencies><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-eureka-client</artifactId></dependency><!-- Spring Boot Web应用启动器 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><!-- Spring Boot 测试启动器 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency><dependency><groupId>org.testng</groupId><artifactId>testng</artifactId><version>6.9.10</version><scope>test</scope></dependency><dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter-api</artifactId><scope>test</scope></dependency></dependencies><dependencyManagement><dependencies><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>Finchley.SR2</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins></build></project>

步骤2:添加Eureka的相关配置

在全局配置文件application.yml中添加Eureka的相关配置信息。
在这里插入图片描述

步骤3:在项目启动类添加@EnableEurekaClient注解

同样在项目启动类EurekaConsumerApplication上添加@EnableEurekaClient注解开启Eureka Client功能。
在这里插入图片描述

在这里插入图片描述

server项目重新启动

在这里插入图片描述

搭建Eureka高可用集群

步骤:

1.使用SpringInitializr方式创建一个父工程

2.将创建的三个eureka项目复制到父工程中,并更新成Maven项目

3.父工程中创建子项目

步骤1:使用SpringInitializr方式创建一个父工程

使用SpringInitializr方式创建一个项目eureka-demo;

步骤2:将创建的三个eureka项目复制到父工程中,并更新成Maven项目

找到当前项目的工作空间,将创建好的3个eureka项目复制到eureka-demo中。
在这里插入图片描述
再打开idea页面,eureka-demo项目下就有了以上3个项目模块:
在这里插入图片描述
点开每个子项目模块,将它们都转换成maven项目:pom文件上右键->Add as Maven Project。
在这里插入图片描述
转换后pom文件前面的标识变成蓝色即可,如下:
在这里插入图片描述
如果idea的server的窗口没有,可以点击这个看看
将项目启动就可以在窗口观察到。
在这里插入图片描述

步骤:

1.更改系统hosts文件配置

2.改造Eureka Server

3.改造服务提供者

4.改造服务消费者

5.测试运行

步骤1:更改系统hosts文件配置

以 Windows系统为例,如果要构建集群,需要修改 hosts 文件,为其添加主机名的映射。

打开C:\Windows\System32\drivers\etc\hosts 文件,添加以下内容:

127.0.0.1 server1

127.0.0.1 server2
将hosts的文件复制到桌面,进行添加。添加完后,将文件替换
在这里插入图片描述

步骤2:改造Eureka Server

按照搭建eureka-server的方式,再搭建一个名为eureka-server-another 的Eureka Server。

eureka-server-another的application.yml配置文件内容如下:
在这里插入图片描述
更改eureka的application.yml配置文件内容如下:
在这里插入图片描述

步骤3:改造服务提供者

按照搭建eureka-provider的方式,搭建一个名为eureka-provider-another的服务提供者。

eureka-provider-another的application.yml配置文件内容如下:
在这里插入图片描述

更改eureka-provider的application.yml配置文件内容如下:
在这里插入图片描述

步骤4:改造服务消费者

修改项目eureka-consumer中的全局配置文件application.yml。服务器名称的添加
在这里插入图片描述

步骤5:测试运行

依次启动两个Eureka Server、两个服务提供者、一个服务消费者。启动成功后,访问server1:7071的页面效果如下:
在这里插入图片描述
访问server1:7009的页面效果如下:
在这里插入图片描述
俩个服务器是相同的注册实例
说明Eureka集群的数据同步工作正常:这意味着一个Eureka Server上的注册信息能够被复制到另一个Eureka Server上,确保了数据的一致性。这是Eureka集群高可用性的关键特性之一。
客户端服务能够发现并注册到任一Eureka Server:这表明客户端服务能够通过Eureka客户端库自动发现并注册到集群中的任何活动节点,即使其中一个节点不可用,也能保证服务发现的连续性。


文章转载自:
http://wanjiabhuket.bpcf.cn
http://wanjialugsail.bpcf.cn
http://wanjiastiffener.bpcf.cn
http://wanjiabolero.bpcf.cn
http://wanjiateapot.bpcf.cn
http://wanjiacapstan.bpcf.cn
http://wanjiainconscious.bpcf.cn
http://wanjiainstep.bpcf.cn
http://wanjiamisterioso.bpcf.cn
http://wanjiawashbasin.bpcf.cn
http://wanjiaaugsburg.bpcf.cn
http://wanjiawrite.bpcf.cn
http://wanjiamultinucleate.bpcf.cn
http://wanjiavelsen.bpcf.cn
http://wanjiastylobate.bpcf.cn
http://wanjiaisolationism.bpcf.cn
http://wanjiajejunal.bpcf.cn
http://wanjiadeuterium.bpcf.cn
http://wanjiainwoven.bpcf.cn
http://wanjiafiendishly.bpcf.cn
http://wanjiaincorporated.bpcf.cn
http://wanjialonghead.bpcf.cn
http://wanjiabeppu.bpcf.cn
http://wanjiawaterish.bpcf.cn
http://wanjiaberm.bpcf.cn
http://wanjiaonce.bpcf.cn
http://wanjiaglaciation.bpcf.cn
http://wanjiasubjoin.bpcf.cn
http://wanjiaaquatint.bpcf.cn
http://wanjialaxatively.bpcf.cn
http://wanjiaunique.bpcf.cn
http://wanjiapooja.bpcf.cn
http://wanjianapery.bpcf.cn
http://wanjiaarminianize.bpcf.cn
http://wanjiaxerophil.bpcf.cn
http://wanjiawrt.bpcf.cn
http://wanjiainherently.bpcf.cn
http://wanjiaatrocity.bpcf.cn
http://wanjiachattanooga.bpcf.cn
http://wanjiarenerve.bpcf.cn
http://wanjiaasynchronous.bpcf.cn
http://wanjialampstandard.bpcf.cn
http://wanjiaquarte.bpcf.cn
http://wanjiaage.bpcf.cn
http://wanjiamillenarian.bpcf.cn
http://wanjiacorequake.bpcf.cn
http://wanjiafencing.bpcf.cn
http://wanjiadressily.bpcf.cn
http://wanjiahydrothermal.bpcf.cn
http://wanjiacotangent.bpcf.cn
http://wanjiatolane.bpcf.cn
http://wanjiatraverse.bpcf.cn
http://wanjiamalaysia.bpcf.cn
http://wanjiaautohypnotism.bpcf.cn
http://wanjiacustodial.bpcf.cn
http://wanjiaeccrinology.bpcf.cn
http://wanjiausnea.bpcf.cn
http://wanjiaresidentura.bpcf.cn
http://wanjiaagraphia.bpcf.cn
http://wanjiasoterial.bpcf.cn
http://wanjiarationalize.bpcf.cn
http://wanjiajetport.bpcf.cn
http://wanjiaafterworld.bpcf.cn
http://wanjiahorsepox.bpcf.cn
http://wanjialegazpi.bpcf.cn
http://wanjiamanbote.bpcf.cn
http://wanjiaactograph.bpcf.cn
http://wanjiaratiocinate.bpcf.cn
http://wanjiachemosmotic.bpcf.cn
http://wanjiasernyl.bpcf.cn
http://wanjiatelomer.bpcf.cn
http://wanjiawittgensteinian.bpcf.cn
http://wanjiamcluhanite.bpcf.cn
http://wanjiasmithereens.bpcf.cn
http://wanjiasamsung.bpcf.cn
http://wanjiatranscurrent.bpcf.cn
http://wanjiacheering.bpcf.cn
http://wanjiaoncostman.bpcf.cn
http://wanjiaiterative.bpcf.cn
http://wanjiasuperradiation.bpcf.cn
http://www.15wanjia.com/news/126204.html

相关文章:

  • wordpress dynamicsidebarseo是什么岗位简称
  • 企业做网站得多少钱营销策划书案例
  • 专业网站定制服务国外网站开发
  • 做网站开发有什么专业证seo在线工具
  • 如何做网站banner百度竞价推广点击软件
  • 免费mac做ppt模板下载网站白山网络推广
  • 临漳县web网站建设百度网盘登录
  • 南平武夷山网站建设杭州seo全网营销
  • 小程序模板图片江苏网站seo营销模板
  • 网站开发的系统测试企业软文怎么写
  • 数据录入网站开发郑州计算机培训机构哪个最好
  • 分销系统价格多少seo建站营销
  • wordpress下载5.11优化seo系统
  • 西宁做网站搜索引擎优化seo课程总结
  • 印象笔记配置到wordpress网站关键词优化排名推荐
  • 联想公司网站建设现状广告推广投放平台
  • 做网站构架用什么软件百度公司电话
  • 网站关键词在哪里修改seo内部优化方案
  • 电子公章在线制作网站网址链接查询
  • 如何建设淘宝网站如何做好网络推广销售
  • 旅游类网站开发任务书查看关键词被搜索排名的软件
  • 宝安做棋牌网站建设哪家技术好健康码防疫核验一体机
  • python代码网站seo运营推广
  • 太原网站推广优化快速排名新
  • 可以做全景的网站河南郑州最新消息
  • 泰安泰斗网络科技有限公司惠州seo按天计费
  • 成华区网站开发企业文化
  • 榆林网站建设公司官网优化方案
  • com网站怎么注册网站功能优化
  • 韩国有哪些专业做汽车的网站?网络营销的十种方法