上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 42 下一页

2021年2月22日

SpringCloud之Gateway原理解析(一)--准备

摘要: 一 准备阶段 这部分比较琐碎,基本上我想到了什么就会写什么 1 gateway的web实现是webFlux,所以Gateway的工程不能引入SpringMvc 2 GatewayLoadBalancerClientAutoConfiguration这个是gateway负载均衡的过滤器实现的加载,他将 阅读全文

posted @ 2021-02-22 11:31 MaXianZhe 阅读(508) 评论(0) 推荐(0)

2021年2月21日

SpringCloud之Feign注解@EnableFeignClients

摘要: 一 @EnableFeignClients @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Documented @Import(FeignClientsRegistrar.class) public @interface 阅读全文

posted @ 2021-02-21 22:13 MaXianZhe 阅读(1160) 评论(0) 推荐(0)

SpringCloud之Feign实现原理

摘要: 一 开启ApacheHttpClient 如果我们使用Apache的 HttpClient作为客户端的话,其实现逻辑就是这样的 @Configuration @ConditionalOnClass({ApacheHttpClient.class})//classpath下必须得有ApacheHttp 阅读全文

posted @ 2021-02-21 18:17 MaXianZhe 阅读(333) 评论(0) 推荐(0)

2021年2月20日

SpringCloud之Eureka保存的服务格式

摘要: 阅读全文

posted @ 2021-02-20 19:49 MaXianZhe 阅读(123) 评论(0) 推荐(0)

SpringCloud之Ribbon源码解析(三)--@LoadBalanced

摘要: 本文着重分析下为什么加了@LoadBalanced就有了负载均衡的能力 先看现象 我们写代码都是这么写的 @SpringBootApplication @EnableEurekaClient @EnableDiscoveryClient public class ServiceRibbonAppli 阅读全文

posted @ 2021-02-20 15:25 MaXianZhe 阅读(234) 评论(0) 推荐(0)

2021年2月19日

SpringCloud之Ribbon源码解析(二)--请求流程

摘要: 一 RestTemplate.doExecute protected <T> T doExecute(URI url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor 阅读全文

posted @ 2021-02-19 15:57 MaXianZhe 阅读(135) 评论(0) 推荐(0)

SpringCloud之Ribbon源码解析(一)--准备

摘要: 一 RibbonAutoConfiguration @Configuration @Conditional(RibbonAutoConfiguration.RibbonClassesConditions.class) @RibbonClients @AutoConfigureAfter( name 阅读全文

posted @ 2021-02-19 11:33 MaXianZhe 阅读(93) 评论(0) 推荐(0)

2021年2月18日

Spring之@Qualifier

摘要: @Qualifier的一个典型的应用是配合@Autowired一起使用的。主要是当要进行@Autowired的字段候选bean有多个的话,使用@Qualifier可以通过BeanName指定Bean注入。 之前有分析过@Autowired的实现原理,这部分就不赘述了 AutowiredFieldEl 阅读全文

posted @ 2021-02-18 20:06 MaXianZhe 阅读(261) 评论(0) 推荐(0)

2021年2月4日

Maven多module打包示例

摘要: 一 整体结构 项目根pom <?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-in 阅读全文

posted @ 2021-02-04 09:59 MaXianZhe 阅读(980) 评论(0) 推荐(0)

2021年2月2日

Spring之Condition(二)在哪里解析的

摘要: 通常情况下@Conditional都会会配合着@Bean一起使用的 来看看代码中在哪里会对@Conditional进行解析 首先看@Bean在哪里解析的 ConfigurationClassParser protected final SourceClass doProcessConfigurati 阅读全文

posted @ 2021-02-02 16:58 MaXianZhe 阅读(121) 评论(0) 推荐(0)

上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 42 下一页

导航