02 2021 档案

SpringBoot和Mybatis结合原理
摘要:今天来试试mybatis新的写法,0配置文件 代码可以这么写 package com.cnsuning.com.mapper; public interface UserMapper { @Select("SELECT * FROM users") @Results({ @Result(proper 阅读全文

posted @ 2021-02-27 16:57 MaXianZhe 阅读(218) 评论(0) 推荐(0) 编辑

Mycat误区解释
摘要:Mycat只能做到分库不分表,和单库分表,不能做到一个库有0-4,另一个库有5-9 使用方式添加subTables="t_order$1-2,t_order3"。 目前分表1.6以后开始支持 并且dataNode在分表条件下只能配置一个,分表条件下不支持各种条件的join语句。 分库不分表,下面这样 阅读全文

posted @ 2021-02-24 21:09 MaXianZhe 阅读(179) 评论(0) 推荐(0) 编辑

Mycat之常用分片规则
摘要:1 取模 2 枚举 <table name="orders_ware_info" dataNode="dn1,dn2" rule="sharding_by_intfile"> </table> <tableRule name="sharding_by_intfile"> <rule> <column 阅读全文

posted @ 2021-02-24 21:03 MaXianZhe 阅读(224) 评论(0) 推荐(0) 编辑

Mycat之ER表划分
摘要:假设现在有两张表orders和orders_detail CREATE TABLE orders ( id INT AUTO_INCREMENT, order_type INT, customer_id INT, amount DECIMAL(10,2), PRIMARY KEY(id) ) CRE 阅读全文

posted @ 2021-02-24 15:15 MaXianZhe 阅读(75) 评论(0) 推荐(0) 编辑

Mycat的做分库正确步骤
摘要:<mycat:schema xmlns:mycat="http://io.mycat/"> <schema name="RDRS_MYCAT_POC" checkSQLschema="true" sqlMaxLimit="100000" dataNode="mysql_node_3" > <tabl 阅读全文

posted @ 2021-02-24 14:45 MaXianZhe 阅读(105) 评论(0) 推荐(0) 编辑

Spring Cloud sentinel使用总结
摘要:1 配置限流 spring: application: name: service-feign cloud: sentinel: transport: port: 8719 dashboard: 192.168.0.105:8080 clientIp: 192.168.0.105 datasourc 阅读全文

posted @ 2021-02-22 19:47 MaXianZhe 阅读(202) 评论(0) 推荐(0) 编辑

SpringCloud之Gateway原理解析(二)--调用过程
摘要:本文参考了https://www.jianshu.com/p/9b813f6ca4c2 作者很牛啊 我们第一个关注的类就是DispatcherHandler,这个类提供的handle()方法,封装了我们之后所有的handlerMappings 这个DispatcherHandler有点想Spring 阅读全文

posted @ 2021-02-22 15:02 MaXianZhe 阅读(571) 评论(0) 推荐(0) 编辑

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

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

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

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

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

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

SpringCloud之Eureka保存的服务格式
摘要: 阅读全文

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

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

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

SpringCloud之Ribbon源码解析(二)--请求流程
摘要:一 RestTemplate.doExecute protected <T> T doExecute(URI url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor 阅读全文

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

SpringCloud之Ribbon源码解析(一)--准备
摘要:一 RibbonAutoConfiguration @Configuration @Conditional(RibbonAutoConfiguration.RibbonClassesConditions.class) @RibbonClients @AutoConfigureAfter( name 阅读全文

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

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

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

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 阅读(965) 评论(0) 推荐(0) 编辑

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

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

SpringBoot启动跟代码过程
摘要:Spring容器启动第一步初始化BeanFactoryBeanPostProcessor,然后就是调用这些BeanFactoryBeanPostProcessor PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors pu 阅读全文

posted @ 2021-02-02 15:59 MaXianZhe 阅读(118) 评论(0) 推荐(0) 编辑

Spring之Condition(一)
摘要:直接上代码 @Configuration public class ConditionalAutoConfig { @Bean @Conditional(RandIntCondition.class) public RandDataComponent<Integer> randIntComponen 阅读全文

posted @ 2021-02-02 11:45 MaXianZhe 阅读(171) 评论(0) 推荐(0) 编辑

Redis集群之故障转移
摘要: 阅读全文

posted @ 2021-02-02 09:59 MaXianZhe 阅读(81) 评论(0) 推荐(0) 编辑

Kafka之 vm.max_map_count
摘要:Maximum number of memory map areas a process may have (aka vm.max_map_count).进程可以具有的最大内存映射区域数(也称为vm.max_map_count)。 See the Linux kernel documentation 阅读全文

posted @ 2021-02-01 17:23 MaXianZhe 阅读(2933) 评论(0) 推荐(0) 编辑

Redis常见面试题
摘要:Redis 的过期策略和内存淘汰机制 定期删除,Redis 默认每个 100ms 检查,有过期 Key 则删除。需要说明的是,Redis 不是每个 100ms 将所有的 Key 检查一次,而是随机抽取进行检查。如果只采用定期删除策略,会导致很多 Key 到时间没有删除。于是,惰性删除派上用场。 定时 阅读全文

posted @ 2021-02-01 14:17 MaXianZhe 阅读(65) 评论(0) 推荐(0) 编辑

Redis为什么快
摘要:三点 这个问题是对 Redis 内部机制的一个考察。很多人都不知道 Redis 是单线程工作模型。 原因主要是以下三点: 纯内存操作 单线程操作,避免了频繁的上下文切换 采用了非阻塞 I/O 多路复用机制 阅读全文

posted @ 2021-02-01 11:47 MaXianZhe 阅读(48) 评论(0) 推荐(0) 编辑

TCP一个包多大
摘要:UDP 包的大小就应该是 1500 - IP头(20) - UDP头(8) = 1472(Bytes)TCP 包的大小就应该是 1500 - IP头(20) - TCP头(20) = 1460 (Bytes) 阅读全文

posted @ 2021-02-01 11:40 MaXianZhe 阅读(1270) 评论(0) 推荐(0) 编辑

JDK8流式处理常用例子
摘要:public class Apple { private Integer id; private String name; private BigDecimal money; private Integer num; public Apple(Integer id, String name, Big 阅读全文

posted @ 2021-02-01 09:18 MaXianZhe 阅读(193) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示