摘要: 使用网关zuul过滤器登录鉴权 1、新建一个filter包 filte有很多种 pre、post。 2、新建一个类LoginFilter,实现ZuulFilter,重写里面的四个方法(可以根据业务建很多个过滤器filter) filterType/filterOrder/shouldFilter/run 1)、filterType返回... 阅读全文
posted @ 2019-03-17 19:20 心目 阅读(4233) 评论(0) 推荐(0) 编辑
摘要: spring cloud中代理服务器zuul的使用 主流网关: zuul kong 基于nginx的API Gateway nginx+lua 1、新建项目,选择eureka discovery 和zuul 2、启动类中增加 @EnableZuulProxy 3、修改配置文件后缀名为yml,并在配置中增加端口号、应用名称和注册中心地址,如下: server:... 阅读全文
posted @ 2019-03-17 12:46 心目 阅读(765) 评论(0) 推荐(0) 编辑
摘要: 断路器Dashboard监控仪表盘的使用 在原有的orderserverfeignhystrix服务中使用 1、增加依赖仓库 org.springframework.cloud spring-cloud-starter-netflix-hystrix-dashboard ... 阅读全文
posted @ 2019-03-17 11:43 心目 阅读(383) 评论(0) 推荐(0) 编辑