<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>NotionNext BLOG</title>
        <link>https://liketool.vip/</link>
        <description>这是一个由不断学习的地方</description>
        <lastBuildDate>Thu, 27 Jul 2023 03:50:15 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2023, ysg学习记录</copyright>
        <item>
            <title><![CDATA[redis]]></title>
            <link>https://liketool.vip/article/java_redis</link>
            <guid>https://liketool.vip/article/java_redis</guid>
            <pubDate>Tue, 25 Jul 2023 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="container" class="mx-auto undefined"><main class="notion light-mode notion-page notion-full-width notion-block-0f5c8f2dfc1b4a6784d169c3992d604a"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-0a4933bb36fc427da3ae402553904739" data-id="0a4933bb36fc427da3ae402553904739"><span><div id="0a4933bb36fc427da3ae402553904739" class="notion-header-anchor"></div><a class="notion-hash-link" href="#0a4933bb36fc427da3ae402553904739" title="redis的使用场景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">redis的使用场景</span></span></h2><div class="notion-text notion-block-98ee377718d5457ca5aac9dc354c558d"><b>1，缓存</b><div class="notion-text-children"><div class="notion-text notion-block-b4cdfee84e6a4264bc40ba8c18a2f173">穿透、击穿、雪崩</div><div class="notion-text notion-block-fcac703afe2c486aa53dfabb700c94c1">双写一致、持久化</div><div class="notion-text notion-block-42e81448c1cd4ee0b8bfb4c05ab23d78">数据过期、淘汰策略</div></div></div><div class="notion-text notion-block-a7126bcd360c40e3b6a45fb8c81edc40"><b>2，分布式锁</b><div class="notion-text-children"><div class="notion-text notion-block-7c27f0af94b94f8e811a6e5690f1869e">setnx、 redisson</div></div></div><div class="notion-text notion-block-d6f44474e3f441348415f58301a75849"><b>3，计数器</b></div><div class="notion-text notion-block-e1288df8d4f747fc9ed69a5511ebe518"><b>4，保存token</b><div class="notion-text-children"><div class="notion-text notion-block-e45e085235b9410fae8e06c06b0834ee">数据类型</div></div></div><div class="notion-text notion-block-d0297455a2524d30a23fd52c343e67c8"><b>5，消息队列</b><div class="notion-text-children"><div class="notion-text notion-block-c916ae20893f44aaabefb673f87e67ad">数据类型</div></div></div><div class="notion-text notion-block-11f8cbf2c80a4385b749c7801f2344dc"><b>6，延迟队列</b><div class="notion-text-children"><div class="notion-text notion-block-4ea06ff1d429443f941892400502ef9e">数据类型</div></div></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-a54837554f1f4515bf13e833ad268208"><div style="position:relative;display:flex;justify-content:center;align-self:start;width:1296px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fe6ca0879-5cb9-46c6-8329-d2e13b8d2d7f%2FUntitled.png?table=block&amp;id=a5483755-4f1f-4515-bf13-e833ad268208" alt="notion image" loading="lazy" decoding="async"/></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-90d3d6bfde124bd685b797311b2f2b1e" data-id="90d3d6bfde124bd685b797311b2f2b1e"><span><div id="90d3d6bfde124bd685b797311b2f2b1e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#90d3d6bfde124bd685b797311b2f2b1e" title="其他使用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">其他使用</span></span></h2><div class="notion-text notion-block-fffd4d969363495a8aa0d3ee4c3fc6a4">1，集群<div class="notion-text-children"><div class="notion-text notion-block-0b28e2d9c2614f30a8ae49099e6efd63">主从、哨兵、集群</div></div></div><div class="notion-text notion-block-d3190befe2094408a095b5683d1cb8fc">2，事务</div><div class="notion-text notion-block-ef5add5f3374428aa0131ffbe7abd10e">3，redis为什么快</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-de06a9d863504a40be945442e42fc3ab"><div style="position:relative;display:flex;justify-content:center;align-self:start;width:495px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F9ffd2968-f784-4f53-ab26-21fadaca98a4%2FUntitled.png?table=block&amp;id=de06a9d8-6350-4a40-be94-5442e42fc3ab" alt="notion image" loading="lazy" decoding="async"/></div></figure><hr class="notion-hr notion-block-057e0848822d4e18a8ad0d14008596e1"/><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-fd1786934e834e62aca2577682b61e9a" data-id="fd1786934e834e62aca2577682b61e9a"><span><div id="fd1786934e834e62aca2577682b61e9a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#fd1786934e834e62aca2577682b61e9a" title="一，缓存穿透"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一，缓存穿透</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-b35916b287454380a47f5b3521793736" data-id="b35916b287454380a47f5b3521793736"><span><div id="b35916b287454380a47f5b3521793736" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b35916b287454380a47f5b3521793736" title="1.概念"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b><b>1.概念</b></b></span></span></h3><div class="notion-text notion-block-6901f5ad633b4e4e84f51e7277908c0f">key 对应的数据在redis中并不存在，每次针对此 key的请求从缓存获取不到，请求转发到数据库，访问量大了可能压垮数据库。比如用一个不存在的用户 id 获取用户信息，redis缓存和数据库中都没有，若黑客利用此漏洞进行攻击可能压垮数据库（黑客访问肯定不存在的数据，造成服务器压力大）</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-cfc84d3e5c4a4d36a4fa0f895dad5135" data-id="cfc84d3e5c4a4d36a4fa0f895dad5135"><span><div id="cfc84d3e5c4a4d36a4fa0f895dad5135" class="notion-header-anchor"></div><a class="notion-hash-link" href="#cfc84d3e5c4a4d36a4fa0f895dad5135" title="缓存穿透现象"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>缓存穿透现象</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-d54a76e00b6c408a8f27c316eda88abb"><li>应用服务器压力变大</li></ul><ul class="notion-list notion-list-disc notion-block-6a7c911403f64d15ac75c86888f48e92"><li>redis命中率变低，从而会不断查询数据库</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-a77e3ca39259499bb0581929045202ea"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fde44e445-714d-44fb-994b-fda1847846e5%2FUntitled.png?table=block&amp;id=a77e3ca3-9259-499b-b058-1929045202ea" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-024420a8ce4c4b59a3e315a720f6c72c"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fee8315a4-a29c-4415-a355-84d95188e923%2FUntitled.png?table=block&amp;id=024420a8-ce4c-4b59-a3e3-15a720f6c72c" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-6c9596a6c4984f39a79b34fee0372d47" data-id="6c9596a6c4984f39a79b34fee0372d47"><span><div id="6c9596a6c4984f39a79b34fee0372d47" class="notion-header-anchor"></div><a class="notion-hash-link" href="#6c9596a6c4984f39a79b34fee0372d47" title="2.解决方案"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b><b>2.解决方案</b></b></span></span></h3><div class="notion-text notion-block-257dd1a64bcf490e93e98fe2af22c80f">一个一定不存在的数据，由于缓存是不命中时被动写的，并且出于容错考虑，如果从存储层查不到数据则不写入缓存，这将导致这个不存在的数据每次请求都要到存储层去查询，失去了缓存的意义</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3827edc4e48945649c24a1e6c3664c12" data-id="3827edc4e48945649c24a1e6c3664c12"><span><div id="3827edc4e48945649c24a1e6c3664c12" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3827edc4e48945649c24a1e6c3664c12" title="2.1,对空值缓存"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.1,<b>对空值缓存</b></span></span></h4><div class="notion-text notion-block-824ce169fc444ebc9aed79a026f97981">如果一个查询返回的数据为空（不管是数据是否不存在），我们仍然把这个空结果（null）进行缓存，这样可以缓解数据库的访问压力，然后设置空结果的过期时间会很短，最长不超过五分钟。（只能作为简单的应急方案）</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-1f4bd99c028c48428afb4422b9c03ee2" data-id="1f4bd99c028c48428afb4422b9c03ee2"><span><div id="1f4bd99c028c48428afb4422b9c03ee2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1f4bd99c028c48428afb4422b9c03ee2" title="2.2,设置可访问的名单（白名单）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.2,<b>设置可访问的名单（白名单）</b></span></span></h4><div class="notion-text notion-block-1667dc58ce6e4747a636c7c250a32157">使用 bitmaps 类型定义一个可以访问的名单，名单 id 作为 bitmaps 的偏移量，每次访问和 bitmap 里面的 id 进行比较，如果访问 id 不在 bitmaps 里面，进行拦截，不允许访问。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-98032a8a53fe48af8bfa0b5e563086ce" data-id="98032a8a53fe48af8bfa0b5e563086ce"><span><div id="98032a8a53fe48af8bfa0b5e563086ce" class="notion-header-anchor"></div><a class="notion-hash-link" href="#98032a8a53fe48af8bfa0b5e563086ce" title="2.3,布隆过滤器"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.3,<b>布隆过滤器</b></span></span></h4><div class="notion-text notion-block-ad753d893c4641a0b2ffd915ab9a905d">将所有可能存在的数据哈希到一个足够大的 bitmaps 中，一个一定不存在的数据会被这个bitmaps 拦截掉，从而避免了对底层存储系统的查询压力</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-84132dd73ce84fdc9761b0e69b80e4b4" data-id="84132dd73ce84fdc9761b0e69b80e4b4"><span><div id="84132dd73ce84fdc9761b0e69b80e4b4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#84132dd73ce84fdc9761b0e69b80e4b4" title="2.4,进行实时监控"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.4,<b>进行实时监控</b></span></span></h4><div class="notion-text notion-block-7a5b9d679dda459f9b525e7f1730fda9">当发现 Redis 的命中率开始急速降低，需要排查访问对象和访问的数据，和运维人员配合，可以设置黑名单限制服务</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1cefe276a81545dfb3c81a147fdd351f" data-id="1cefe276a81545dfb3c81a147fdd351f"><span><div id="1cefe276a81545dfb3c81a147fdd351f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1cefe276a81545dfb3c81a147fdd351f" title="二、缓存击穿"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b><b>二、缓存击穿</b></b></span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-4d33a7fdeec741638286ec37a196e4aa" data-id="4d33a7fdeec741638286ec37a196e4aa"><span><div id="4d33a7fdeec741638286ec37a196e4aa" class="notion-header-anchor"></div><a class="notion-hash-link" href="#4d33a7fdeec741638286ec37a196e4aa" title="1.概念"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b><b>1.概念</b></b></span></span></h3><div class="notion-text notion-block-4276284716574a6aaf9f45ca50d1faef">key 对应的数据存在，但在 redis 中过期，此时若有大量并发请求过来，这些请求发现缓存过期一般都会从后端 DB 加载数据并回设到缓存，这个时候大量并发的请求可能会瞬间把后端 DB 压垮（<b>redis某个热门数据过期，大量的合理数据请求到达数据库</b>）</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-543a74e744e947b9b8456696f7718dc5"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F7b01b0e4-5e31-47b0-94c0-fc30bb5b0f89%2FUntitled.png?table=block&amp;id=543a74e7-44e9-47b9-b845-6696f7718dc5" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-da0edbf65060495489e786b68a98a30f" data-id="da0edbf65060495489e786b68a98a30f"><span><div id="da0edbf65060495489e786b68a98a30f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#da0edbf65060495489e786b68a98a30f" title="缓存击穿现象"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>缓存击穿现象</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-3f114b01edfa4590a1ccf0b482416fc4"><li>数据库的访问压力瞬间激增</li></ul><ul class="notion-list notion-list-disc notion-block-a9bb36fa6e3940c1b25360cc082009b5"><li>redis正常运行</li></ul><ul class="notion-list notion-list-disc notion-block-8bf08a9200844bb6aac88d7f72092f1f"><li>redis没有出现大量的过期现象（过期后无法访问，若未命中，则需要访问数据库）</li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-d1536727f31145ce80e408a342911c39" data-id="d1536727f31145ce80e408a342911c39"><span><div id="d1536727f31145ce80e408a342911c39" class="notion-header-anchor"></div><a class="notion-hash-link" href="#d1536727f31145ce80e408a342911c39" title="产生原因"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>产生原因</b></span></span></h4><div class="notion-text notion-block-5e81e58f899b4d218c85d414c691d8a8">redis中的某个热门的key过期了，而此时客户端对这个key的访问量激增，redis无法命中，这些访问就会转发到数据库，造成数据库瞬间压力过大</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-7f97acc8dcec490790e2d5170650ff79" data-id="7f97acc8dcec490790e2d5170650ff79"><span><div id="7f97acc8dcec490790e2d5170650ff79" class="notion-header-anchor"></div><a class="notion-hash-link" href="#7f97acc8dcec490790e2d5170650ff79" title="2. 解决方案"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b><b>2. 解决方案</b></b></span></span></h3><div class="notion-blank notion-block-fe0809c8ad7e4728a9563af550b4b0b9"> </div><div class="notion-blank notion-block-14023a9a87534f7c80ad0c2dacc31843"> </div><div class="notion-text notion-block-5bf7397539aa46d39568357dbd7b7aa0"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://blog.csdn.net/qq_42500831/article/details/125499702">https://blog.csdn.net/qq_42500831/article/details/125499702</a></div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[集合 、JSON、类相互转换]]></title>
            <link>https://liketool.vip/article/collection_json_class_change</link>
            <guid>https://liketool.vip/article/collection_json_class_change</guid>
            <pubDate>Tue, 25 Jul 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[集合 、JSON、类相互转换]]></description>
            <content:encoded><![CDATA[<div id="container" class="mx-auto undefined"><main class="notion light-mode notion-page notion-block-0f5d890a732e4b65aa66fd7dc2e43ff1"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-8b96f52e0139446fb833f5483378c7bd"><b>Map转实体 / 实体转Map</b></div><div class="notion-text notion-block-e2b31ddf8af348b3845b124a2205d5bc"><b>List集合</b></div><div class="notion-text notion-block-325bd96b66304314a605850e5d4f58e7"><b>实体=JSON</b></div><hr class="notion-hr notion-block-2dacc00188064dd39e8841d8e30bd0e4"/><a style="width:100%" href="https://s.qiniu.com/JzyUnm" target="blank_"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-7db07cb3b4b24234bc9814bf8e690661"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fd498e264-a9d8-4901-a54c-44ab85c98e19%2FUntitled.jpg?table=block&amp;id=7db07cb3-b4b2-4234-bc98-14bf8e690661" alt="https://s.qiniu.com/JzyUnm" loading="lazy" decoding="async"/></div></figure></a></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java进阶必读书籍推荐]]></title>
            <link>https://liketool.vip/article/java_senior_book</link>
            <guid>https://liketool.vip/article/java_senior_book</guid>
            <pubDate>Tue, 18 Jul 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[书还是要读的]]></description>
            <content:encoded><![CDATA[<div id="container" class="mx-auto undefined"><main class="notion light-mode notion-page notion-full-width notion-block-8494f738609f4f00800717521436dfc5"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-c5ef9a5d51d94319a5c15140e8e6a128" data-id="c5ef9a5d51d94319a5c15140e8e6a128"><span><div id="c5ef9a5d51d94319a5c15140e8e6a128" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c5ef9a5d51d94319a5c15140e8e6a128" title="一 java编程入门"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一 java编程入门</span></span></h2><div class="notion-text notion-block-d08428c8d7ec4e96800e6279b2bb0be2">《java编程思想》，《Agile java》中文版，《你必须知道的261个java语言问题》</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-447105ec3b0847edb016008852798a27" data-id="447105ec3b0847edb016008852798a27"><span><div id="447105ec3b0847edb016008852798a27" class="notion-header-anchor"></div><a class="notion-hash-link" href="#447105ec3b0847edb016008852798a27" title="二 java编程进阶"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二 java编程进阶</span></span></h2><div class="notion-text notion-block-54ca89531bd042af9d1b62f4c1babf4f">《编程匠艺——如何编写卓越的代码》，《重构 改善既有代码的设计》，《驱动测试开发 by Example》</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-08de8c8ead3d46dcbf0c2a5051f491c0" data-id="08de8c8ead3d46dcbf0c2a5051f491c0"><span><div id="08de8c8ead3d46dcbf0c2a5051f491c0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#08de8c8ead3d46dcbf0c2a5051f491c0" title="三 java架构师之路"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">三 java架构师之路</span></span></h2><div class="notion-text notion-block-9426f14dcf3941699d550761ae4b66d3">《Expert One-on-One J2EE Design and Development》，《企业应用架构模式》，《敏捷软件开发原则、模式和实践》</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-793b9541b70c4886abd97485689f7a7b" data-id="793b9541b70c4886abd97485689f7a7b"><span><div id="793b9541b70c4886abd97485689f7a7b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#793b9541b70c4886abd97485689f7a7b" title="四 软件开发过程"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">四 软件开发过程</span></span></h2><div class="notion-text notion-block-24421b207ea24a53b2201d6874bc0758">《UML精粹》，《解析极限编程 拥抱变化》，《统一软件开发过程》，《敏捷建模》</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-f786422b0b7f44eead3ce0af64b3fb35" data-id="f786422b0b7f44eead3ce0af64b3fb35"><span><div id="f786422b0b7f44eead3ce0af64b3fb35" class="notion-header-anchor"></div><a class="notion-hash-link" href="#f786422b0b7f44eead3ce0af64b3fb35" title="五 软件项目管理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">五 软件项目管理</span></span></h2><div class="notion-text notion-block-443193b2405341a38cd2602d2c802eb5">《快速软件开发》</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-f99babfc4182401d9d2d19c0dbab5e9e" data-id="f99babfc4182401d9d2d19c0dbab5e9e"><span><div id="f99babfc4182401d9d2d19c0dbab5e9e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#f99babfc4182401d9d2d19c0dbab5e9e" title="六 其他"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">六 其他</span></span></h2><div class="notion-text notion-block-c1e11179575e4e7592bf19be18cd5948">《我编程我快乐》，《程序员上班那点事儿》，《淡定的人生不寂寞》</div><div class="notion-text notion-block-13a4cdb6a30545139506fa614026b51c">下面是java Inside上推荐的基本书：</div><div class="notion-text notion-block-f1b885f40c4f4b93bae217e1c4d6029d">1 中文版链接：《Java编程规范》</div><div class="notion-text notion-block-3182bea3242e4cc686ff5222064645c3">英文版链接：《The Java Language Specification (3rd Edition) 》</div><div class="notion-text notion-block-d0ed10479b934555903c1054b9c4056a">2 中文版链接：《Effective Java 第二版》</div><div class="notion-text notion-block-7eeaee42852f4e879c085e8fd58f269d">文版链接：《Effective Java (2nd Edition) 》</div><div class="notion-text notion-block-87289db7212e4b2d8468ae2a065a2122">3 中文版链接：《JAVA并发编程实践》</div><div class="notion-text notion-block-5f459e108347462f9ae9959e72bf6c52">英文版链接：《Java Concurrency in Practice 》</div><div class="notion-text notion-block-91582e082b314106bedc8836421b10f2">4 中文版链接：《JAVA解惑》</div><div class="notion-text notion-block-f66f30623c3d409f8deb71be417b7307">英文版链接：《Java Puzzlers : Traps, Pitfalls, and Corner Cases 》</div><div class="notion-text notion-block-c5e92ed3820945a68cebb2e2a346a55e">5 中文版链接：《JAVA编程思想(第4版)》</div><div class="notion-text notion-block-e2a6504e30704174936d430ed5d70c5d">英文版链接：《Thinking in Java (4th Edition) 》</div><div class="notion-text notion-block-0894c1f0f7f64351a633498aee7815e5">6 中文版链接：《轻快的JAVA》</div><div class="notion-text notion-block-95d47656311a4d64acdbd048fb391eb8">英文版链接：《Better, Faster, Lighter Java 》</div><div class="notion-text notion-block-af41bdf6f0894dba88cd425d29b80c1c">7 中文版链接：《JAVA核心技术，卷1，卷2》</div><div class="notion-text notion-block-ddd24d943eff40e38eb63c8c648ae412">英文版链接：《Core Java, Volume I-Fundamentals (8th Edition) ，Core Java, Vol. 2: Advanced Features, 8th Edition 》</div><div class="notion-text notion-block-b19a88f0c3f446e4b6a4f985ae64c5ca">8 中文版链接：《暂无》</div><div class="notion-text notion-block-2f7f3eb417bf4689989a2d9e34c28e41">英文版链接：《The Java Virtual Machine Specification (2nd Edition) 》</div><div class="notion-text notion-block-56fbc9c6a8184fcdb5578e106d2762aa">9 中文版链接：《ROBUST JAVA中文版-JAVA异常处理、测试与调试》</div><div class="notion-text notion-block-220075c35fb24a3e98777a5d9fd584d2">英文版链接：《Robust Java Exception Handling,Testing and Debugging 》</div><div class="notion-text notion-block-c30353f7c22842269430a7d443667688">10 java编码规范：</div><div class="notion-text notion-block-89f40c4a97bd4e9681206bb9444101f7"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://java.sun.com/docs/codeconv/CodeConventions.pdf">http://java.sun.com/docs/codeconv/CodeConventions.pdf</a></div><div class="notion-text notion-block-37fa6c2b927d482e8998cafb13ffb4cc">详情参考：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://blog.csdn.net/yaerfeng/article/details/7100086">http://blog.csdn.net/yaerfeng/article/details/7100086</a></div><div class="notion-text notion-block-5d262b5fc0224e829b4bddd22fb1fa46"><b>学java入门到精通，不得不看的15本书。作为Java程序员来说，最痛苦的事情莫过于可以选择的范围太广，可以读的书太多，往往容易无所适从。我想就我自己读过的技术书籍中挑选出来一些，按照学习的先后顺序，推荐给大家，特别是那些想不断提高自己技术水平的Java程序员们。</b></div><div class="notion-text notion-block-f274b449563e40f58a428dfa6e6fc081">以下书籍电子版下载地址：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://u.ixueyi.com/tatran/2775.html">http://u.ixueyi.com/tatran/2775.html</a> 。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-b9362df4f4004eb4a1c98e82cd835a5a" data-id="b9362df4f4004eb4a1c98e82cd835a5a"><span><div id="b9362df4f4004eb4a1c98e82cd835a5a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b9362df4f4004eb4a1c98e82cd835a5a" title="一、Java编程入门类"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、Java编程入门类</span></span></h3><div class="notion-text notion-block-125d6b6cd2e4478fbf8d6d4a358c9f3b">1、《Java编程思想》</div><div class="notion-text notion-block-cb0af219d29c487cafc8a5429bb4688c">2、《Agile Java》中文版</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-b6c885a9ec744af49fcc6f7d56b64145" data-id="b6c885a9ec744af49fcc6f7d56b64145"><span><div id="b6c885a9ec744af49fcc6f7d56b64145" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b6c885a9ec744af49fcc6f7d56b64145" title="二、Java编程进阶类"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、Java编程进阶类</span></span></h3><div class="notion-text notion-block-08b068b0bf844c10a929097312e100df">1、《重构 改善既有代码的设计》</div><div class="notion-text notion-block-082232b9d30446268a0f6d56b7ec9afc">这本书名气很大，不用多介绍，可以在闲暇的时候多翻翻，多和自己的实践相互印证。这本书对产生影响是潜移默化的。</div><div class="notion-text notion-block-7db5272353cf4a52ad2e2f6a6be4eae0">2、《测试驱动开发 by Example》</div><div class="notion-text notion-block-2a3d01efb3da4e70835436ea6b4cbca9">本书最大特点是很薄，看起来没有什么负担。可以找一个周末的下午，一边看，一边照做，一个下午就把书看完，这本书的所有例子跑完了。这本书的作用是通过实战让你培养TDD的思路。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-008690caa5a94c6cbd4b259aafd17f49" data-id="008690caa5a94c6cbd4b259aafd17f49"><span><div id="008690caa5a94c6cbd4b259aafd17f49" class="notion-header-anchor"></div><a class="notion-hash-link" href="#008690caa5a94c6cbd4b259aafd17f49" title="三、Java架构师之路"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">三、Java架构师之路</span></span></h3><div class="notion-text notion-block-4bf9706758a9415f803a6dd6ab9cf06d">到这个阶段，应该已经非常娴熟的运用Java编程，而且有了一个良好的编程思路和习惯了，但是可能还缺乏对应用软件整体架构的把握，现在就是迈向架构师的第一步。</div><div class="notion-text notion-block-d1393f7eac2f4d9ea5289d953e96720a">1、《Expert One-on-One J2EE Design and Development》</div><div class="notion-text notion-block-88fd82c743294e75918da3f78960605b">这本书是Rod Johnson的成名著作，非常经典，从这本书中的代码诞生了springframework。但是好像这本书没有中译本。</div><div class="notion-text notion-block-11f409b99a374002865a574db2c1a711">2、《Expert One-on-One J2EE Development without EJB》</div><div class="notion-text notion-block-66ec427f65ad4be6a20b6f720ab7b964">这本书由gigix组织翻译，多位业界专家参与，虽然署名译者是JavaEye，其实JavaEye出力不多，实在是忝居译者之名。</div><div class="notion-text notion-block-e7d9661cd171410d9b1cc24793917734">3、《企业应用架构模式》</div><div class="notion-text notion-block-83784e4fc1274afeb090c3a8b0817680">4、《敏捷软件开发原则、模式与实践》</div><div class="notion-text notion-block-8d4ef78909c94fbf872f5cb12cf1c5aa">Uncle Bob的名著，敏捷的经典名著，这本书比较特别，与其说是讲软件开发过程的书，不如说讲软件架构的书，本书用了很大篇幅讲各种面向对象软件开发的各种模式，个人以为看了这本书，就不必看GoF的《设计模式》了。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-cf28044fc2c042a6ad368a1e6ff17847" data-id="cf28044fc2c042a6ad368a1e6ff17847"><span><div id="cf28044fc2c042a6ad368a1e6ff17847" class="notion-header-anchor"></div><a class="notion-hash-link" href="#cf28044fc2c042a6ad368a1e6ff17847" title="四、软件开发过程"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">四、软件开发过程</span></span></h3><div class="notion-text notion-block-57874f9e02b44d6e8f3fbbd68dc4e1c7">了解软件开发过程不单纯是提高程序员个人的良好编程习惯，也是增强团队协作的基础。</div><div class="notion-text notion-block-abb45fb487cb4fa5851fd778ffea4633">1、《UML精粹》</div><div class="notion-text notion-block-74150828e16743d992c1b8c679d46e10">2、《解析极限编程 拥抱变化》XP</div><div class="notion-text notion-block-779b917fad8f460a9769d0fe3d60a293">这是Kent Beck名著的第二版，中英文对照。没什么好说的，必读书籍。</div><div class="notion-text notion-block-8ea4f595005245899aae84e738e32044">3、《统一软件开发过程》UP</div><div class="notion-text notion-block-1eba812f5dfb4d2db3478c569c6c9efc">4、《敏捷建模》AM</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-a0510206d30649a89f599a997c5aad90" data-id="a0510206d30649a89f599a997c5aad90"><span><div id="a0510206d30649a89f599a997c5aad90" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a0510206d30649a89f599a997c5aad90" title="五、软件项目管理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">五、软件项目管理</span></span></h3><div class="notion-text notion-block-9ef81e5a6b47428b974c29b7272de666">如果突然被领导提拔为项目经理，而完全没有项目管理经验，肯定会心里没底；如果觉得自己管理项目不善，很想改善项目管理能力，那么去考PMP肯定是远水不解近渴的。</div><div class="notion-text notion-block-1ef56b72bf7c46d79312cc8edd37cd13">1、《快速软件开发》</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-df72c5beb30c49ce94d99c6294792457" data-id="df72c5beb30c49ce94d99c6294792457"><span><div id="df72c5beb30c49ce94d99c6294792457" class="notion-header-anchor"></div><a class="notion-hash-link" href="#df72c5beb30c49ce94d99c6294792457" title="六、总结"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">六、总结</span></span></h3><div class="notion-text notion-block-bbd7619cf723431eb2be5b55e49ee8e9">在这份推荐阅读书籍的名单中，没有列举流行的软件框架类学习书籍，例如Struts，Hibernate，Spring之类，也没有列举AJAX方面的书籍。是因为这类书籍容易过时，而上述的大半书籍的生命周期都足够长，值得去购买和收藏。</div><hr class="notion-hr notion-block-635f79098bfc4343919c704ffa06a171"/><a style="width:100%" href="https://s.qiniu.com/JzyUnm" target="blank_"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-192eff794cde40b39fb5895b3cf7cef3"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fe1436699-6824-41ff-8243-ad6678f984ad%2FUntitled.jpg?table=block&amp;id=192eff79-4cde-40b3-9fb5-895b3cf7cef3" alt="https://s.qiniu.com/JzyUnm" loading="lazy" decoding="async"/></div></figure></a></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[mysql查询添加序号]]></title>
            <link>https://liketool.vip/article/mysql_select_add_number</link>
            <guid>https://liketool.vip/article/mysql_select_add_number</guid>
            <pubDate>Mon, 17 Jul 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[在MySQL中查询数据时，常常需要给结果集中的每一行添加一个序号，方便查看和处理数据]]></description>
            <content:encoded><![CDATA[<div id="container" class="mx-auto undefined"><main class="notion light-mode notion-page notion-full-width notion-block-53a019471f704431a7a70eb39718d30d"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-98fd68288a3544378cf13e5390172f76" data-id="98fd68288a3544378cf13e5390172f76"><span><div id="98fd68288a3544378cf13e5390172f76" class="notion-header-anchor"></div><a class="notion-hash-link" href="#98fd68288a3544378cf13e5390172f76" title="定义用户变量"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">定义用户变量</span></span></h2><div class="notion-text notion-block-fedaed3644994b2f8106ea1fac190131">在SQL语句中通过定义一个用户变量，然后每查询一行数据就将用户变量自增1并赋值给序号列，这种方法可以实现对查询结果集添加序号。</div><div class="notion-text notion-block-be456a3f74ab4f21a3d9fc417120f788">示例SQL语句：</div><div class="notion-text notion-block-34bd276bdee74f43ab96512d8693f15b">SELECT id, userid, subject, score, (@i := @i+1) AS &#x27;序号&#x27; FROM tb_score, (SELECT @i:=0) AS iTable;</div><div class="notion-text notion-block-3399843e46e44f81a931924f0c3e959d">解释说明：</div><ul class="notion-list notion-list-disc notion-block-1d1c6333b37b4f74ac6007dfd3792413"><li>(@i := @i+1) 代表的意思是：变量 i 加 1 赋值给变量 i，在定义好一个变量后每次查询都会给这个变量自增，每次执行查询语句获取结果后就不需要自增了。</li></ul><ul class="notion-list notion-list-disc notion-block-c60ad37c6ea54e8db4f0af893965bfd3"><li>(SELECT @i:=0) ASiTable，定义用户变量 i，设置初始值为 0，然后将它作为派生表使用，AS 定义了表的别名。</li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1a1bd763b15d4ad3a1dd3b95941fa16b" data-id="1a1bd763b15d4ad3a1dd3b95941fa16b"><span><div id="1a1bd763b15d4ad3a1dd3b95941fa16b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1a1bd763b15d4ad3a1dd3b95941fa16b" title="实际用法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">实际用法</span></span></h2><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-9ef44fc69de244be980beb04ffdcbf47"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:313px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F60011d27-6e85-4996-a388-ff7dc73f6242%2FUntitled.png?table=block&amp;id=9ef44fc6-9de2-44be-980b-eb04ffdcbf47" alt="notion image" loading="lazy" decoding="async"/></div></figure><hr class="notion-hr notion-block-8192ff6fece14e05b97ab6770abc4dd1"/><a style="width:100%" href="https://s.qiniu.com/JzyUnm" target="blank_"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-ace336933e68437da39cbcb1f1db4288"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Faf022ce1-c9cf-455b-b2e9-2c0e66897f3a%2FUntitled.jpg?table=block&amp;id=ace33693-3e68-437d-a39c-bcb1f1db4288" alt="https://s.qiniu.com/JzyUnm" loading="lazy" decoding="async"/></div></figure></a><div class="notion-blank notion-block-23965fbd293840acbfda006cb3c36bf8"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[多个excel整合一个]]></title>
            <link>https://liketool.vip/article/example-1</link>
            <guid>https://liketool.vip/article/example-1</guid>
            <pubDate>Mon, 10 Jul 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[将对应的excel中sheet的数据、样式全部copy到sheet中，然后将新建的excel填充数据]]></description>
            <content:encoded><![CDATA[<div id="container" class="mx-auto undefined"><main class="notion light-mode notion-page notion-full-width notion-block-5ee6b591f09d483e8d7ed5478fda82c8"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-d5512e72fd3f40c0abd0608e9d732c9d">1，将对应的excel中sheet的数据、样式全部copy到sheet中，然后将新建的excel填充数据</div><div class="notion-text notion-block-8188200e0cfb40b08f4b1986d297910a">2，excel配置</div><hr class="notion-hr notion-block-c1a58b7087d94750ac3998399c377b5f"/><a style="width:100%" href="https://s.qiniu.com/JzyUnm" target="blank_"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-0e5dc96e16264af0b25e5352e2f3fd81"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fcc9c3e40-b6d0-4dbc-9925-6e7a80b5880f%2FUntitled.jpeg?table=block&amp;id=0e5dc96e-1626-4af0-b25e-5352e2f3fd81" alt="https://s.qiniu.com/JzyUnm" loading="lazy" decoding="async"/></div></figure></a></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>