<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[ycdeveloper的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/ycdeveloper</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; ycdeveloper]]></copyright><item><title><![CDATA[源码阅读-springboot如何启动内嵌tomcat]]></title><link>https://blog.csdn.net/ycdeveloper/article/details/120862251</link><guid>https://blog.csdn.net/ycdeveloper/article/details/120862251</guid><author>ycdeveloper</author><pubDate>Wed, 20 Oct 2021 11:14:14 +0800</pubDate><description><![CDATA[1.实例化SpringApplication


public SpringApplication(ResourceLoader resourceLoader, Class&lt;?&gt;... primarySources) {
         //资源加载器赋值
          this.resourceLoader = resourceLoader;
          //判断主类是否为空
          Assert.notNull(primarySources, "PrimarySo]]></description><category></category></item><item><title><![CDATA[CompletableFuture应用并发查询结果归集]]></title><link>https://blog.csdn.net/ycdeveloper/article/details/120861900</link><guid>https://blog.csdn.net/ycdeveloper/article/details/120861900</guid><author>ycdeveloper</author><pubDate>Wed, 20 Oct 2021 11:05:51 +0800</pubDate><description><![CDATA[业务场景:查询当前登录人待审批,已审批,未提交的个数。

因为每个状态所涉及的查询逻辑是不一样的,如果用一个线程串行去跑,需要执行至少3个sql,但实际上有7,8个sql,串行执行返回时长大概需要800ms左右。

优化:利用CompletableFuture并行去查询,对结果进行归集


public class Result{
    
    private Integer unCommit;

    private Integer waitApprove;

    private Integer]]></description><category></category></item><item><title><![CDATA[mybatis学习相关总结]]></title><link>https://blog.csdn.net/ycdeveloper/article/details/120513562</link><guid>https://blog.csdn.net/ycdeveloper/article/details/120513562</guid><author>ycdeveloper</author><pubDate>Tue, 28 Sep 2021 09:26:43 +0800</pubDate><description><![CDATA[1.最原始的操作数据库



Class.forName("com.mysql.jdbc.Driver");
  // 打开连接
  conn = DriverManager.getConnection(DB_URL, USER, PASSWORD);
  // 执行查询
  stmt = conn.createStatement();
  String sql= "SELECT bid, name, author_id FROM blog";
  ResultSet rs = stmt.executeQ.]]></description><category></category></item><item><title><![CDATA[linux平均负载相关知识]]></title><link>https://blog.csdn.net/ycdeveloper/article/details/120513480</link><guid>https://blog.csdn.net/ycdeveloper/article/details/120513480</guid><author>ycdeveloper</author><pubDate>Mon, 27 Sep 2021 17:31:49 +0800</pubDate><description><![CDATA[1.查看平均负载
  uptime 可以查看平均负载 1 5 15
2.平均负载指的是单位时间,系统处于可运行状态和不可中断状态的平均进程数。平均活跃进程数。
3.可运行状态
  ps 中处于R(running和runnable)的进程
4.不可中断状态
  正处于内核关键流程中的进程,这些流程是不可打断的。比如最常见的是等待硬件设备的 I/O 响应，
  也就是我们在 ps 命令中看到的 D 状态 (Uninterruptible Sleep，也称为 Disk Sleep)的进程。
5.不可中断状态实际.]]></description><category></category></item><item><title><![CDATA[zookeeper相关知识]]></title><link>https://blog.csdn.net/ycdeveloper/article/details/120513345</link><guid>https://blog.csdn.net/ycdeveloper/article/details/120513345</guid><author>ycdeveloper</author><pubDate>Mon, 27 Sep 2021 17:27:54 +0800</pubDate><description><![CDATA[1.zk是分布式应用协调服务。可以做注册中心,配置中心等。
  它是集群的管理者，监视着集群中各个节点的状态根据节点提交的反馈进行下一步合理操作

2.客户端的读请求可以被集群中的任意一台机器处理，如果读请求在节点上注册了监听器，
  这个监听器也是由所连接的zookeeper机器来处理。对于写请求，这些请求会同时发给其他zookeeper机器并且达成一致后，
  请求才会返回成功。因此，随着zookeeper的集群机器增多，读请求的吞吐会提高但是写请求的吞吐会下降

3.有序性是zookeeper中非常.]]></description><category></category></item><item><title><![CDATA[Mybatis拦截器实用案例-自动更新创建人,更新人信息]]></title><link>https://blog.csdn.net/ycdeveloper/article/details/116153462</link><guid>https://blog.csdn.net/ycdeveloper/article/details/116153462</guid><author>ycdeveloper</author><pubDate>Sun, 26 Sep 2021 10:25:26 +0800</pubDate><description><![CDATA[场景:

  项目里面有很多更新创建人,更新人的地方。每次新增,更新数据的时候都需要带入这些信息。

一般的处理逻辑:

  每个sql语句都携带创建人,更新人信息,人员信息从线程本地变量中获取。  


public class UserInfoThreadLocal{

    private static ThreadLocal&lt;Long&gt; userIdLocal = new ThreadLocal&lt;&gt;();

    
    public static L...]]></description><category></category></item></channel></rss>