b-betty / microservice Goto Github PK
View Code? Open in Web Editor NEW尚硅谷微服务springcloud第一季
尚硅谷微服务springcloud第一季
drop database if exists DB03; create database DB03 character set UTF8; use DB03; CREATE TABLE dept ( dept_no INT auto_increment NOT NULL, dept_name varchar(100) NOT NULL, db_source varchar(100) NOT null, primary key(dept_no) ); INSERT INTO dept(dept_name, db_source) VALUES('计划部', DATABASE()); INSERT INTO dept(dept_name, db_source) VALUES('生产部', DATABASE()); INSERT INTO dept(dept_name, db_source) VALUES('研发部', DATABASE()); 1、eureka的注册与发现 2、eureka集群 @@EnableEurekaClient @@EnableEurekaServer 3、ribbon负载均衡 @LoadBalance @@EnableEurekaClient 自定义ribbon @RibbonClient(name = "MICROSERVICECLOUD-DEPT", configuration = MySelfRule.class) @Configuration @Bean IRule 4、feign负载均衡:接口+注解,面向接口编程 @FeignClient(value = "MICROSERVICECLOUD-DEPT") @EnableFeignClients(basePackages = "com.betty") //feign默认使用轮询算法 5、Hystrix 断路器 5.1、服务熔断-- 服务端返回 @EnableCircuitBreaker //hystrix @HystrixCommand(fallbackMethod = "processHystrix_Get") @FeignClient(value = "MICROSERVICECLOUD-DEPT") 5.2、服务降级--客户端,与服务端无关 与feign (接口+注解的负载均衡)配合使用 @FeignClient(value = "MICROSERVICECLOUD-DEPT", fallbackFactory = DeptClientFallBackFactory.class) //服务降级 5.3、HystrixDashboard 服务监控 (豪猪) HystrixDashboard页面: http://localhost:9001/hystrix 监控对象: http://localhost:8001/hystrix.stream 查看:7色、1圈、1线 6、zuul 网关 @EnableZuulProxy 不用代理 http://localhost:8001/dept/get/3 使用代理 http://myZuul.com:9527/microservicecloud-dept/dept/get/3 7、spring cloud config配置管理
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.