Spring Cloud Alibaba基础教程:Sentinel使用Apollo存储规则
Sentinel自身就支持了多种不同的数据源来持久化规则配置,目前包括以下几种方式: 文件配置 Nacos配置 ZooKeeper配置 Apollo配置 本文我们就来一起动手尝试一下,如何使用Apollo来存储限流规则。 下面我们将同时使用到 Apollo 和 Sentinel Dashboard ,所以可以先把 Apollo 和 Sentinel Dashboard 启动起来。 如果还没入门 Sentinel Dashboard 可以通过文末的系列目录先学习之前的内容。Apollo的话相对复杂一些,这里不做详细介绍了,如果还没有接触过Apollo的读者可以查看其 官方文档 进一步学习。 第一步 :在Spring Cloud应用的 pom.xml 中引入Spring Cloud Alibaba的Sentinel模块和Apollo存储扩展: <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter