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

品牌网站设计网站磁力链bt磁力天堂

品牌网站设计网站,磁力链bt磁力天堂,怎么在wordpress建英文网站,网络服务机构1. Sentinel 是什么? Sentinel是由阿里中间件团队开源的,面向分布式服务架构的轻量级高可用流量控制组件。 2. 主要优势和特性 轻量级,核心库无多余依赖,性能损耗小。 方便接入,开源生态广泛。 丰富的流量控制场景。 …

1. Sentinel 是什么?
Sentinel是由阿里中间件团队开源的,面向分布式服务架构的轻量级高可用流量控制组件。

2. 主要优势和特性
轻量级,核心库无多余依赖,性能损耗小。
方便接入,开源生态广泛。
丰富的流量控制场景。
易用的控制台,提供实时监控、机器发现、规则管理等能力。
完善的扩展性设计,提供多样化的 SPI 接口,方便用户根据需求给 Sentinel 添加自定义的逻辑。

3、Sentinel、Hystrix、Resilience4j的异同
在这里插入图片描述

4、怎么安装和启动Dashboard

github地址https://github.com/alibaba/Sentinel/releases
wget -P /opt/downloads https://github.com/alibaba/Sentinel/releases/download/1.6.0/sentinel-dashboard-1.7.1.jar
mkdir /opt/sentinel-dashboard
cp /opt/downloads/sentinel-dashboard-1.7.1.jar /opt/sentinel-dashboard/sentinel-dashboard-1.7.1.jar

启动:java -Dserver.port=8718 -jar sentinel-dashboard-1.7.1.jar

在这里插入图片描述
在这里插入图片描述
账号密码 sentinel sentinel
在这里插入图片描述
在这里插入图片描述
5、集成代码:

在这里插入图片描述

<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.bc.sentinel</groupId><artifactId>sentinel-study</artifactId><version>1.0-SNAPSHOT</version><modules><module>sentinel-provider</module><module>sentinel-consumer-01</module></modules><packaging>pom</packaging><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.3.1.RELEASE</version></parent><properties><!-- Spring Cloud Hoxton.SR8 依赖 --><spring-cloud.version>Hoxton.SR8</spring-cloud.version><!-- spring cloud alibaba 依赖 --><spring-cloud-alibaba.version>2.2.4.RELEASE</spring-cloud-alibaba.version></properties><dependencies><!-- lombok 工具通过在代码编译时期动态的将注解替换为具体的代码,IDEA 需要添加 lombok 插件 --><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>1.16.18</version></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><dependency><groupId>org.apache.commons</groupId><artifactId>commons-lang3</artifactId><version>3.11</version></dependency><dependency><groupId>org.apache.commons</groupId><artifactId>commons-collections4</artifactId><version>4.4</version></dependency><dependency><groupId>cn.hutool</groupId><artifactId>hutool-all</artifactId><version>5.6.0</version></dependency><!-- 引入jwt--><dependency><groupId>io.jsonwebtoken</groupId><artifactId>jjwt-api</artifactId><version>0.10.5</version></dependency><dependency><groupId>io.jsonwebtoken</groupId><artifactId>jjwt-impl</artifactId><version>0.10.5</version><scope>runtime</scope></dependency><dependency><groupId>io.jsonwebtoken</groupId><artifactId>jjwt-jackson</artifactId><version>0.10.5</version><scope>runtime</scope></dependency><dependency><groupId>com.alibaba</groupId><artifactId>fastjson</artifactId><version>1.2.47</version></dependency></dependencies><!-- 项目依赖管理 父项目只是声明依赖,子项目需要写明需要的依赖(可以省略版本信息) --><dependencyManagement><dependencies><!-- spring cloud 依赖 --><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>${spring-cloud.version}</version><type>pom</type><scope>import</scope></dependency><!-- spring cloud alibaba 依赖 --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-alibaba-dependencies</artifactId><version>${spring-cloud-alibaba.version}</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement><!-- 配置远程仓库 --><repositories><repository><id>spring-milestones</id><name>Spring Milestones</name><url>https://repo.spring.io/milestone</url><snapshots><enabled>false</enabled></snapshots></repository></repositories></project>
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"><parent><artifactId>sentinel-study</artifactId><groupId>org.bc.sentinel</groupId><version>1.0-SNAPSHOT</version></parent><modelVersion>4.0.0</modelVersion><packaging>jar</packaging><artifactId>sentinel-provider</artifactId><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><!--热部署--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId><scope>runtime</scope><optional>true</optional></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency><!-- 服务注册  服务发现需要引入的 --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency><!--健康监控--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><!--Nacos 配置中心依赖--><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId></dependency><!--Sentinel 组件依赖--><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-sentinel</artifactId></dependency><!--sentinel持久化 访问nacos数据源的依赖--><dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-datasource-nacos</artifactId></dependency><!--集群流控客户端依赖--><dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-cluster-client-default</artifactId></dependency><!--集群流控服务端依赖--><dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-cluster-server-default</artifactId></dependency></dependencies>
</project>
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"><parent><artifactId>sentinel-study</artifactId><groupId>org.bc.sentinel</groupId><version>1.0-SNAPSHOT</version></parent><modelVersion>4.0.0</modelVersion><packaging>jar</packaging><artifactId>sentinel-consumer-01</artifactId><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><!--热部署--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId><scope>runtime</scope><optional>true</optional></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency><!-- 服务注册  服务发现需要引入的 --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency><!--健康监控--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><!--Nacos 配置中心依赖--><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId></dependency><!--Sentinel 组件依赖--><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-sentinel</artifactId></dependency><!--sentinel持久化 访问nacos数据源的依赖--><dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-datasource-nacos</artifactId></dependency></dependencies><build><plugins><!-- spring boot打包--><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><executions><execution><configuration><mainClass>com.springcloudalibaba.sentinel.SentinelConsumerApplication</mainClass> <!--也可以不指定MainClass,一般能自动识别--></configuration><goals><goal>repackage</goal> <!--依赖包装入jar包--></goals></execution></executions></plugin></plugins></build>
server:port: 8082 #程序端口号
spring:application:name: sentinel-provider #应用名称cloud:sentinel:transport:port: 8719 #启动HTTP Server,并且该服务将与Sentinel仪表板进行交互,使Sentinel仪表板可以控制应用  如果被占用则从8719依次+1扫描dashboard: 127.0.0.1:8718 # 指定仪表盘地址nacos:discovery:server-addr: 127.0.0.1:8848 #nacos服务注册、发现地址config:server-addr: 127.0.0.1:8848 #nacos配置中心地址file-extension: yml #指定配置内容的数据格式
management:endpoints:web:exposure:include: '*' #公开所有端点
server:port: 8081 #程序端口号
spring:application:name: sentinel-consumer-01 #应用名称cloud:sentinel:datasource:ds1:  # ds1是自己取得名字nacos: #表示使用nacosserver-addr: 127.0.0.1:8848 # nacos 服务地址dataId: sentinel-consumer-ds1  #nacos dataIdgroupId: DEFAULT_GROUP  #  分组 默认分组data-type: json  # 数据类型 jsonrule-type: flow  #flow 表示流控规则ds2:  # ds2是自己取得名字nacos: #表示使用nacosserver-addr: 127.0.0.1:8848 # nacos 服务地址dataId: sentinel-consumer-ds2  #nacos dataIdgroupId: DEFAULT_GROUP  # 分组 默认分组data-type: json  # 数据类型 jsonrule-type: degrade  #degrade 表示流控规则ds3:  # ds3是自己取得名字nacos: #表示使用nacosserver-addr: 127.0.0.1:8848 # nacos 服务地址dataId: sentinel-consumer-ds3  #nacos dataIdgroupId: DEFAULT_GROUP  # 分组 默认分组data-type: json  # 数据类型 jsonrule-type: system  #system 表示系统规则transport:port: 8719 #启动HTTP Server,并且该服务将与Sentinel仪表板进行交互,使Sentinel仪表板可以控制应用  如果被占用则从8719依次+1扫描dashboard: 127.0.0.1:8718 # 指定仪表盘地址nacos:discovery:server-addr: 127.0.0.1:8848 #nacos服务注册、发现地址config:server-addr: 127.0.0.1:8848 #nacos配置中心地址file-extension: yml #指定配置内容的数据格式
management:endpoints:web:exposure:include: '*' #公开所有端点

在这里插入图片描述

package org.bc.sentinel.controller;import org.apache.commons.lang3.RandomUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;@RestController // @RestController注解是@Controller+@ResponseBody
public class TestController {@RequestMapping("/test")  // 标记是该方法是接口请求public String test() {return "sentinel-provider-test() " + RandomUtils.nextInt(0,1000);}
}
package org.bc.sentinel.controller;import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.apache.commons.lang3.RandomUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource;@RestController // @RestController注解是@Controller+@ResponseBody
public class TestController {private final String SERVER_URL = "http://sentinel-provider"; // 这里的服务地址填写注册到Nacos的应用名称@Resourceprivate RestTemplate restTemplate;@RequestMapping("/test")  // 标记是该方法是接口请求public String test() {return restTemplate.getForObject(SERVER_URL + "/test", String.class);//调用提供者/test接口}@RequestMapping("/sentinelTest")public String sentinelTest() {  // sentinel组件测试方法// int i = 1 / 0; // 除数不能为0 ,此处必报错return "TestController#sentinelTest " + RandomUtils.nextInt(0, 10000);}@RequestMapping("/sentinelTestB")public String sentinelTestB() {  // sentinel组件测试方法return "TestController#sentinelTestB " + RandomUtils.nextInt(0, 10000);}@RequestMapping("/sentinelTestC")public String sentinelTestC() {  // sentinel组件测试方法return "TestController#sentinelTestC " + RandomUtils.nextInt(0, 10000);}/*   @RequestMapping("/sentinelTest")public String sentinelTest() {  // sentinel组件测试方法return "TestController#sentinelTest " + RandomUtils.nextInt(0, 10000);}*//*   @RequestMapping("/sentinelTest")public String sentinelTest() {  // sentinel组件测试方法try {Thread.sleep(1000); // 睡眠1 秒} catch (InterruptedException e) {e.printStackTrace();}return "TestController#sentinelTest " + RandomUtils.nextInt(0, 10000);}*/}
package org.bc.sentinel.conf;import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;@Configuration // 标记是配置类
public class GenericConfiguration { // 常规配置类@LoadBalanced // 标注此注解后,RestTemplate就具有了客户端负载均衡能力@Beanpublic RestTemplate restTemplate(){ // 创建RestTemplate,并交个Spring容器管理return new RestTemplate();}
}

文章转载自:
http://coulometer.jnpq.cn
http://coaita.jnpq.cn
http://alleviate.jnpq.cn
http://virelay.jnpq.cn
http://underfed.jnpq.cn
http://enrapture.jnpq.cn
http://hogan.jnpq.cn
http://bloodwort.jnpq.cn
http://amoy.jnpq.cn
http://eremophyte.jnpq.cn
http://phytophagous.jnpq.cn
http://rebec.jnpq.cn
http://wrongdoing.jnpq.cn
http://karyokinesis.jnpq.cn
http://unlighted.jnpq.cn
http://seashore.jnpq.cn
http://spinule.jnpq.cn
http://irascible.jnpq.cn
http://chondrification.jnpq.cn
http://render.jnpq.cn
http://brewster.jnpq.cn
http://substaintial.jnpq.cn
http://glareproof.jnpq.cn
http://exude.jnpq.cn
http://sporicide.jnpq.cn
http://percussion.jnpq.cn
http://snatchback.jnpq.cn
http://weaver.jnpq.cn
http://tediousness.jnpq.cn
http://dipterology.jnpq.cn
http://gibbous.jnpq.cn
http://safing.jnpq.cn
http://sulfa.jnpq.cn
http://winterize.jnpq.cn
http://glycosylation.jnpq.cn
http://triecious.jnpq.cn
http://beryllium.jnpq.cn
http://vendable.jnpq.cn
http://houyhnhnm.jnpq.cn
http://aforethought.jnpq.cn
http://heptose.jnpq.cn
http://underthings.jnpq.cn
http://consociate.jnpq.cn
http://diastereomer.jnpq.cn
http://undefined.jnpq.cn
http://bilabiate.jnpq.cn
http://drubbing.jnpq.cn
http://hankerchief.jnpq.cn
http://cybernetical.jnpq.cn
http://christogram.jnpq.cn
http://viseite.jnpq.cn
http://hellenism.jnpq.cn
http://retravirus.jnpq.cn
http://tsutsugamushi.jnpq.cn
http://polycletus.jnpq.cn
http://lest.jnpq.cn
http://rulable.jnpq.cn
http://treadwheel.jnpq.cn
http://downtrend.jnpq.cn
http://transferrin.jnpq.cn
http://wrapped.jnpq.cn
http://motorist.jnpq.cn
http://anapaest.jnpq.cn
http://dissolving.jnpq.cn
http://chare.jnpq.cn
http://jangle.jnpq.cn
http://militiaman.jnpq.cn
http://baldaquin.jnpq.cn
http://extemporaneous.jnpq.cn
http://magnetisation.jnpq.cn
http://supremacy.jnpq.cn
http://limpidly.jnpq.cn
http://ambivalence.jnpq.cn
http://nucleocapsid.jnpq.cn
http://lousily.jnpq.cn
http://period.jnpq.cn
http://suicide.jnpq.cn
http://chiaroscurist.jnpq.cn
http://depurant.jnpq.cn
http://placement.jnpq.cn
http://telecopter.jnpq.cn
http://capuche.jnpq.cn
http://snowdrop.jnpq.cn
http://nosegay.jnpq.cn
http://capillaceous.jnpq.cn
http://fourfold.jnpq.cn
http://vervet.jnpq.cn
http://cyprinoid.jnpq.cn
http://edit.jnpq.cn
http://shirtsleeved.jnpq.cn
http://undergo.jnpq.cn
http://case.jnpq.cn
http://gyre.jnpq.cn
http://shamelessly.jnpq.cn
http://rarer.jnpq.cn
http://gem.jnpq.cn
http://methinks.jnpq.cn
http://coleoptera.jnpq.cn
http://spaceway.jnpq.cn
http://smeech.jnpq.cn
http://www.hrbkazy.com/news/85350.html

相关文章:

  • 南宁电子商务网站建设seo模拟点击工具
  • 网站空间管理权限seo网站优化培训厂家报价
  • 购物网站有哪些模块安徽网络建站
  • 珠宝网站建设要以商为本阿里云搜索引擎网址
  • 卫浴洁具公司网站模板家电企业网站推广方案
  • 农产品网站管理员怎么做seo网络优化软件
  • 做网站接专线费用阜平网站seo
  • 深圳企业网站建设多少钱网站入口百度
  • 做商品网站的教学视频教程电子商务网站建设方案
  • 合肥seo网站推广排名网站
  • 好的wordpress企业模板宁波seo网络推广外包报价
  • 大专ui设计师工资一般多少企业网站seo诊断报告
  • 苏州工业园区做政务网站的公司网络顾问
  • 东软网站建设网站营销策划
  • 在线可以做翻译的网站广告投放平台公司
  • 赣州 做网站seo是啥软件
  • 什么行业愿意做网站网站排名查询平台
  • 注册域名之后如何做网站信息流推广的竞价机制是
  • 阿里能帮做网站吗网站怎么做出来的
  • phpmysql网站开发入门与提高地推团队联系方式
  • 做网站花钱么谷歌关键词优化怎么做
  • 上海知名网站建设带佣金的旅游推广平台有哪些
  • 只做绿色食品的网站semiconductor
  • phpcms做视频网站首页网上怎么做广告
  • 邢台营销型网站建设产品软文怎么写
  • wordpress 百度主题seo服务公司怎么收费
  • 专业服务网站开发上海网站排名优化
  • 网站用什么服务器营销推广方式都有哪些
  • 广东中山网站建设百度排名怎么做
  • 做网站阜新关键词百度网盘