摘要: 代码: class Parent { public Parent() { System.out.println("4 父类构造方法"); } static { System.out.println("1 父类静态代码块"); } { System.out.println("3 父类普通代码块"); 阅读全文
posted @ 2021-06-29 14:24 一柒微笑 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 实现Ioc的大体思路 1.自定义一个AnnotationConfigApplicationContext类,构造器传入要扫描的包 2.获取包下所有的类 3.遍历这些类,找出添加了@Component 注解的类,获取他的class和beanName,封装成一个BeanDefinition,存入集合Se 阅读全文
posted @ 2021-06-22 07:22 一柒微笑 阅读(30) 评论(0) 推荐(0) 编辑
摘要: Gateway是什么? Gateway旨在提供一种简单而有效的方式来对API进行路由,以及提供一些强大的过滤器功能,例如:熔断、限流、重试等 Gateway是基于WebFlux框架实现的,而WebFlux框架底层则使用了高性能的Reactor模式通信框架Netty 1.Gateway能干嘛? 反向代 阅读全文
posted @ 2021-06-10 18:20 一柒微笑 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1.pom引入依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-openfeign</artifactId> </dependency> 2.主启动类添加 @En 阅读全文
posted @ 2021-06-09 18:05 一柒微笑 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Spring Cloud Ribbon是Netflix Ribbon实现的一套客户端,主要功能是提供客户端软件负载均衡算法和服务调用。Ribbon客户端提供一系列完善的配置如连接超时,重试等。就是在配置文件中列出Load Balancer后面的所有机器,Ribbon会自动帮你基于某种规则(如简单轮询 阅读全文
posted @ 2021-06-09 16:50 一柒微笑 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 1.pom引入依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-consul-discovery</artifactId> </dependency> 2.修改y 阅读全文
posted @ 2021-06-08 18:16 一柒微笑 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 1.pom引入依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-zookeeper-discovery</artifactId> <exclusions> <ex 阅读全文
posted @ 2021-06-08 18:09 一柒微笑 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Eureka客户端 1.pom文件引入依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </ 阅读全文
posted @ 2021-06-08 17:51 一柒微笑 阅读(43) 评论(0) 推荐(0) 编辑
摘要: spring cloud 服务组件 阅读全文
posted @ 2021-06-08 17:21 一柒微笑 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 分区查询 row_number() over(partition by ) SELECT * FROM ( SELECT *, ROW_NUMBER() over ( PARTITION BY client_id ORDER BY create_time DESC ) num FROM app_ro 阅读全文
posted @ 2021-06-06 17:53 一柒微笑 阅读(109) 评论(0) 推荐(0) 编辑