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

简历设计网站布吉做棋牌网站建设

简历设计网站,布吉做棋牌网站建设,网站授权管理系统怎么做,网络舆情的特点Spring Cloud Gateway 是一个用于构建 API 网关的项目&#xff0c;它是 Spring Cloud 生态系统中的一部分&#xff0c;旨在为微服务架构提供动态路由、负载均衡、安全性和监控等功能。 网关工程对应pom文件 <?xml version"1.0" encoding"UTF-8"?>…

Spring Cloud Gateway 是一个用于构建 API 网关的项目,它是 Spring Cloud 生态系统中的一部分,旨在为微服务架构提供动态路由、负载均衡、安全性和监控等功能。

 

网关工程对应pom文件

<?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>com.xuecheng</groupId><artifactId>xuecheng-plus-parent</artifactId><version>0.0.1-SNAPSHOT</version><relativePath>../xuecheng-plus-parent</relativePath></parent><artifactId>xuecheng-plus-gateway</artifactId><dependencies><!--网关--><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-gateway</artifactId></dependency><!--服务发现中心--><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId></dependency><dependency><groupId>com.alibaba</groupId><artifactId>fastjson</artifactId></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId></dependency><!-- 排除 Spring Boot 依赖的日志包冲突 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter</artifactId><exclusions><exclusion><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-logging</artifactId></exclusion></exclusions></dependency><!-- Spring Boot 集成 log4j2 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-log4j2</artifactId></dependency></dependencies></project>

工程对应的bootstrap.yaml

#微服务配置
spring:application:name: gatewaycloud:nacos:server-addr: 192.168.101.65:8848discovery:namespace: dev402group: xuecheng-plus-projectconfig:namespace: dev402group: xuecheng-plus-projectfile-extension: yamlrefresh-enabled: trueshared-configs:- data-id: logging-${spring.profiles.active}.yamlgroup: xuecheng-plus-commonrefresh: trueprofiles:active: dev

Nacos对应网关配置文件

server:port: 63010 # 网关端口
spring:cloud:gateway:
#      filter:
#        strip-prefix:
#          enabled: trueroutes: # 网关路由配置- id: content-api # 路由id,自定义,只要唯一即可# uri: http://127.0.0.1:8081 # 路由的目标地址 http就是固定地址uri: lb://content-api # 路由的目标地址 lb就是负载均衡,后面跟服务名称predicates: # 路由断言,也就是判断请求是否符合路由规则的条件- Path=/content/** # 这个是按照路径匹配,只要以/content/开头就符合要求
#          filters:
#            - StripPrefix=1- id: system-api# uri: http://127.0.0.1:8081uri: lb://system-apipredicates:- Path=/system/**
#          filters:
#            - StripPrefix=1- id: media-api# uri: http://127.0.0.1:8081uri: lb://media-apipredicates:- Path=/media/**
#          filters:
#            - StripPrefix=1- id: search-service# uri: http://127.0.0.1:8081uri: lb://searchpredicates:- Path=/search/**
#          filters:
#            - StripPrefix=1- id: auth-service# uri: http://127.0.0.1:8081uri: lb://auth-servicepredicates:- Path=/auth/**
#          filters:
#            - StripPrefix=1- id: checkcode# uri: http://127.0.0.1:8081uri: lb://checkcodepredicates:- Path=/checkcode/**
#          filters:
#            - StripPrefix=1- id: learning-api# uri: http://127.0.0.1:8081uri: lb://learning-apipredicates:- Path=/learning/**
#          filters:
#            - StripPrefix=1- id: orders-api# uri: http://127.0.0.1:8081uri: lb://orders-apipredicates:- Path=/orders/**
#          filters:
#            - StripPrefix=1

测试

这个时候请求就可以直接使用网关对应的ip+port进行接口请求了

 

http://www.yayakq.cn/news/192946/

相关文章:

  • html5做音乐网站网站建设下单源码
  • 刷赞网站推广ks网站竞价推广托管公司
  • 未备案网站处理系统百元便宜建站
  • 微信官网下载安装微信石家庄网站排名优化
  • 如何申请com网站wordpress配置cdn
  • php做的网站怎么运行wordpress怎么引用新浪ajax
  • 网站建设推广注意什么网站备案了有什么好处
  • 东莞销售网站建设请别人做网站如何交付
  • 广西圣泰建设工程有限公司网站网站用的什么字体设计
  • 我做的网站怎样推广的自适应网站优点缺点
  • 湖南网站开发公司电话集约化网站建设的函
  • 建设银行u盾自动弹出网站wordpress多站点统计
  • 网站建设 qq业务网制作免费虚拟机下载手机版
  • 网站关键词搜不到了沈阳网站建设哪家便宜
  • 用illustrator做网站昆明网站定制
  • 网站返回按钮设计找人做的网站第二年多钱
  • 一级a做爰片免费网站给我看看灯饰网站源码
  • gis网站开发教程二级目录怎么生成
  • 集团网站开发公司企业官网网站设计
  • 广州网站设计开发公司启东市住房城乡建设局网站
  • 培训网站设计鲜花网站模板下载
  • 怎么样利用一些网站开发客户中国建设监理协会继续教育网站
  • 微博 分享 wordpress雄安网站建设优化公司
  • 模板网站制作服务宣传电脑的网站开发
  • 网站开发团队成员东莞企业网站建设多少钱
  • 宿州商务网站建设数据库如何存储wordpress
  • 网站建设项目费用报价广东东莞属于哪个市
  • 百度收录哪些网站吗网页版微信二维码登录方法
  • 个人做免费的网站怎么做推广赚佣金
  • 海珠区建网站门户网站开发教程