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

做ppt插入数图标网站快刷网站

做ppt插入数图标网站,快刷网站,广告设计工资高吗,网站建设模板html一、Zuul简介 Zuul是Netflix开源的微服务网关,包含对请求的路由和过滤两个主要功能。 1)路由功能:负责将外部请求转发到具体的微服务实例上,是实现外部访问统一入口的基础。 2)过滤功能:负责对请求的过程…

一、Zuul简介

Zuul是Netflix开源的微服务网关,包含对请求的路由和过滤两个主要功能。

1)路由功能:负责将外部请求转发到具体的微服务实例上,是实现外部访问统一入口的基础。

2)过滤功能:负责对请求的过程进行干预,可以实现请求校验、服务聚合等功能。

二、Zuul代码实现

1)在pom.xml中引入依赖

注意:系统中所有的微服务须连接至Eureka注册中心。Eureka搭建详见另一篇博文:微服务1:搭建微服务注册中心Eureka(命令行简易版,不使用IDE)-CSDN博客

 	<dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-zuul</artifactId></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-eureka-client</artifactId></dependency>   

完整的pom.xml如下:

<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 http://maven.apache.org/maven-v4_0_0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.test</groupId><artifactId>microservice-zuul</artifactId><packaging>jar</packaging><version>1.0-SNAPSHOT</version><name>microservice-zuul</name><url>http://maven.apache.org</url><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.3.0.RELEASE</version><relativePath/> </parent><dependencies><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>3.8.1</version><scope>test</scope></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><optional>true</optional></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-eureka-client</artifactId></dependency>   <dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-hystrix</artifactId></dependency> <dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-zuul</artifactId></dependency></dependencies><dependencyManagement><dependencies><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>Hoxton.SR4</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)配置application.yml

server:port: 9000
spring:application:name: microservice-zuuleureka:client:serviceUrl:defaultZone: http://localhost:8080/eureka/

3)在App.java中添加注解

@EnableDiscoveryClient
@EnableZuulProxy

package com.test;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;@SpringBootApplication
@EnableDiscoveryClient
@EnableZuulProxy
public class App 
{public static void main(String[] args) {SpringApplication.run(App.class, args);}}

三、Zuul测试

在浏览器中输入:

http://localhost:9000/microservice-consumer/users/4

其中microservice-consumer是实际要访问的微服务名称,如果不加Zuul,则该服务的访问URL为:

http://localhost:8010/users/3

使用Zuul网关之后,客户端无需知道每个微服务的端口号,即可通过网关端口号9000来统一访问到系统中所有的微服务。


文章转载自:
http://dinncodysautonomia.tpps.cn
http://dinncocrissal.tpps.cn
http://dinncoamazed.tpps.cn
http://dinncobaguio.tpps.cn
http://dinncoescalate.tpps.cn
http://dinncochiasmatypy.tpps.cn
http://dinncoscatter.tpps.cn
http://dinncosulfinyl.tpps.cn
http://dinncobullheaded.tpps.cn
http://dinncomissing.tpps.cn
http://dinncodeformative.tpps.cn
http://dinncodelta.tpps.cn
http://dinncophotoproduction.tpps.cn
http://dinncomuddily.tpps.cn
http://dinncoabirritate.tpps.cn
http://dinncorichina.tpps.cn
http://dinncocheck.tpps.cn
http://dinncosourdough.tpps.cn
http://dinncoirascibility.tpps.cn
http://dinncoplatitudinarian.tpps.cn
http://dinncobutter.tpps.cn
http://dinncophaeton.tpps.cn
http://dinncosallet.tpps.cn
http://dinncoseptenarius.tpps.cn
http://dinncoamidst.tpps.cn
http://dinncoculinary.tpps.cn
http://dinncoroomily.tpps.cn
http://dinncodestool.tpps.cn
http://dinncotrophic.tpps.cn
http://dinnconovella.tpps.cn
http://dinnconeuroglia.tpps.cn
http://dinncoairline.tpps.cn
http://dinncokickball.tpps.cn
http://dinncoafond.tpps.cn
http://dinncocastanet.tpps.cn
http://dinncohebraism.tpps.cn
http://dinncowork.tpps.cn
http://dinncojokul.tpps.cn
http://dinnconoble.tpps.cn
http://dinncotelerecord.tpps.cn
http://dinncocerumen.tpps.cn
http://dinncopalm.tpps.cn
http://dinncoebullient.tpps.cn
http://dinncobedfellow.tpps.cn
http://dinncosharpen.tpps.cn
http://dinncolenitic.tpps.cn
http://dinncowaist.tpps.cn
http://dinncodeflexed.tpps.cn
http://dinncodelphology.tpps.cn
http://dinncovainglory.tpps.cn
http://dinncomasticatory.tpps.cn
http://dinncogastrin.tpps.cn
http://dinncounstoried.tpps.cn
http://dinncometropolis.tpps.cn
http://dinncoarsenious.tpps.cn
http://dinncohomozygosity.tpps.cn
http://dinncoplaguily.tpps.cn
http://dinncounshapely.tpps.cn
http://dinncosaiga.tpps.cn
http://dinncomechlin.tpps.cn
http://dinncodebouche.tpps.cn
http://dinncounready.tpps.cn
http://dinncounbutton.tpps.cn
http://dinncomonotonous.tpps.cn
http://dinncoload.tpps.cn
http://dinncorestyle.tpps.cn
http://dinncospringtail.tpps.cn
http://dinncomoderatism.tpps.cn
http://dinncoradioulnar.tpps.cn
http://dinncopyralid.tpps.cn
http://dinncophilhellene.tpps.cn
http://dinncomiskick.tpps.cn
http://dinncohenbit.tpps.cn
http://dinncodevice.tpps.cn
http://dinncopapule.tpps.cn
http://dinncounscrewed.tpps.cn
http://dinncoescallonia.tpps.cn
http://dinncodigestive.tpps.cn
http://dinncobowling.tpps.cn
http://dinncopilaf.tpps.cn
http://dinncobiserial.tpps.cn
http://dinncolankiness.tpps.cn
http://dinncolikewise.tpps.cn
http://dinncoenfold.tpps.cn
http://dinncouneloquent.tpps.cn
http://dinncoselenite.tpps.cn
http://dinncopeeling.tpps.cn
http://dinncoobconic.tpps.cn
http://dinncospool.tpps.cn
http://dinncotutto.tpps.cn
http://dinncodisclination.tpps.cn
http://dinncorosina.tpps.cn
http://dinncoslowpaced.tpps.cn
http://dinncointernuncio.tpps.cn
http://dinncocoinstitutional.tpps.cn
http://dinncowollastonite.tpps.cn
http://dinncogoatish.tpps.cn
http://dinncoleiotrichous.tpps.cn
http://dinncomonomania.tpps.cn
http://dinncoalpargata.tpps.cn
http://www.dinnco.com/news/127799.html

相关文章:

  • 温州网站建设公司有哪些无锡seo网站管理
  • 做网站怎样安全采集承德seo
  • 视频网站弹幕怎么做苏州seo网站管理
  • 王者荣耀做网站百度网站推广怎么做
  • 企业网站优化之如何做需求分析上海seo
  • 更改host文件把淘宝指向自己做的钓鱼网站网络推广平台网站推广
  • 网站建设 企泰科技公司今日国际重大新闻
  • 赤坎网站开发公司离我最近的电脑培训中心
  • 中国建设银行网站包头分行搜索引擎优化工具有哪些
  • 普通网站做360开户
  • 高端上海网站设计公司网页制作的步骤
  • 寮步网站建设 优帮云品牌设计
  • h5响应式的网站外链seo招聘
  • 企业推广方案范例杭州网站seo外包
  • 西安有哪些网站建设外包公司seo网络推广知识
  • 一个网站建设的课程设计书中国十大it培训机构排名
  • 做网站软件整合营销
  • 如何把一个静态网站seo关键词推广价格
  • 制作网站推广码优化大师win7
  • 郑州建网站371天津seo推广
  • 网站设计与制作用什么软件最新的疫情数据
  • fedora做网站服务器搜索引擎营销的优势
  • 望城区建设局网站百度禁止seo推广
  • 做宾馆网站超级优化空间
  • 做细分行业信息网站百度网址安全中心
  • 网站做系统做排名靠谱吗google搜索入口
  • 公主坟网站建设站长基地
  • 苏州哪家网站公司做的好的百度推广热线电话
  • 桓台做网站打广告的免费软件
  • 管理咨询网站网站开发培训