277 lines
31 KiB
HTML
277 lines
31 KiB
HTML
<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>分类: java | 一只攻城狮的学习之旅</title><meta name="author" content="逝水无痕"><meta name="copyright" content="逝水无痕"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="给时光以生命,给岁月以文明"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://zyjblogs.cn/categories/java/index.html"><link rel="preconnect" href="//cdnjs.cloudflare.com"/><link rel="preconnect" href="//hm.baidu.com"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://jsd.cdn.zzko.cn/npm/@fortawesome/fontawesome-free/css/all.min.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancyapps-ui/5.0.24/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>var _hmt = _hmt || [];
|
||
(function() {
|
||
var hm = document.createElement("script");
|
||
hm.src = "https://hm.baidu.com/hm.js?6edd69cc926242ec43e7194677fb8040";
|
||
var s = document.getElementsByTagName("script")[0];
|
||
s.parentNode.insertBefore(hm, s);
|
||
})();
|
||
</script><script>const GLOBAL_CONFIG = {
|
||
root: '/',
|
||
algolia: undefined,
|
||
localSearch: {"path":"/search.xml","preload":false,"top_n_per_article":1,"unescape":false,"languages":{"hits_empty":"找不到您查询的内容:${query}","hits_stats":"共找到 ${hits} 篇文章"}},
|
||
translate: undefined,
|
||
noticeOutdate: undefined,
|
||
highlight: {"plugin":"highlight.js","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
|
||
copy: {
|
||
success: '复制成功',
|
||
error: '复制错误',
|
||
noSupport: '浏览器不支持'
|
||
},
|
||
relativeDate: {
|
||
homepage: false,
|
||
post: false
|
||
},
|
||
runtime: '天',
|
||
dateSuffix: {
|
||
just: '刚刚',
|
||
min: '分钟前',
|
||
hour: '小时前',
|
||
day: '天前',
|
||
month: '个月前'
|
||
},
|
||
copyright: undefined,
|
||
lightbox: 'fancybox',
|
||
Snackbar: undefined,
|
||
infinitegrid: {
|
||
js: 'https://cdnjs.cloudflare.com/ajax/libs/egjs-infinitegrid/4.11.1/infinitegrid.min.js',
|
||
buttonText: '加载更多'
|
||
},
|
||
isPhotoFigcaption: false,
|
||
islazyload: true,
|
||
isAnchor: false,
|
||
percent: {
|
||
toc: true,
|
||
rightside: true,
|
||
},
|
||
autoDarkmode: true
|
||
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
|
||
title: '分类: java',
|
||
isPost: false,
|
||
isHome: false,
|
||
isHighlightShrink: false,
|
||
isToc: false,
|
||
postUpdate: '2024-10-19 13:42:59'
|
||
}</script><script>(win=>{
|
||
win.saveToLocal = {
|
||
set: (key, value, ttl) => {
|
||
if (ttl === 0) return
|
||
const now = Date.now()
|
||
const expiry = now + ttl * 86400000
|
||
const item = {
|
||
value,
|
||
expiry
|
||
}
|
||
localStorage.setItem(key, JSON.stringify(item))
|
||
},
|
||
|
||
get: key => {
|
||
const itemStr = localStorage.getItem(key)
|
||
|
||
if (!itemStr) {
|
||
return undefined
|
||
}
|
||
const item = JSON.parse(itemStr)
|
||
const now = Date.now()
|
||
|
||
if (now > item.expiry) {
|
||
localStorage.removeItem(key)
|
||
return undefined
|
||
}
|
||
return item.value
|
||
}
|
||
}
|
||
|
||
win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
|
||
const script = document.createElement('script')
|
||
script.src = url
|
||
script.async = true
|
||
script.onerror = reject
|
||
script.onload = script.onreadystatechange = function() {
|
||
const loadState = this.readyState
|
||
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
|
||
script.onload = script.onreadystatechange = null
|
||
resolve()
|
||
}
|
||
|
||
Object.keys(attr).forEach(key => {
|
||
script.setAttribute(key, attr[key])
|
||
})
|
||
|
||
document.head.appendChild(script)
|
||
})
|
||
|
||
win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
|
||
const link = document.createElement('link')
|
||
link.rel = 'stylesheet'
|
||
link.href = url
|
||
if (id) link.id = id
|
||
link.onerror = reject
|
||
link.onload = link.onreadystatechange = function() {
|
||
const loadState = this.readyState
|
||
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
|
||
link.onload = link.onreadystatechange = null
|
||
resolve()
|
||
}
|
||
document.head.appendChild(link)
|
||
})
|
||
|
||
win.activateDarkMode = () => {
|
||
document.documentElement.setAttribute('data-theme', 'dark')
|
||
if (document.querySelector('meta[name="theme-color"]') !== null) {
|
||
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
|
||
}
|
||
}
|
||
win.activateLightMode = () => {
|
||
document.documentElement.setAttribute('data-theme', 'light')
|
||
if (document.querySelector('meta[name="theme-color"]') !== null) {
|
||
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
|
||
}
|
||
}
|
||
const t = saveToLocal.get('theme')
|
||
|
||
const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
|
||
const isLightMode = window.matchMedia('(prefers-color-scheme: light)').matches
|
||
const isNotSpecified = window.matchMedia('(prefers-color-scheme: no-preference)').matches
|
||
const hasNoSupport = !isDarkMode && !isLightMode && !isNotSpecified
|
||
|
||
if (t === undefined) {
|
||
if (isLightMode) activateLightMode()
|
||
else if (isDarkMode) activateDarkMode()
|
||
else if (isNotSpecified || hasNoSupport) {
|
||
const now = new Date()
|
||
const hour = now.getHours()
|
||
const isNight = hour <= 6 || hour >= 18
|
||
isNight ? activateDarkMode() : activateLightMode()
|
||
}
|
||
window.matchMedia('(prefers-color-scheme: dark)').addListener(e => {
|
||
if (saveToLocal.get('theme') === undefined) {
|
||
e.matches ? activateDarkMode() : activateLightMode()
|
||
}
|
||
})
|
||
} else if (t === 'light') activateLightMode()
|
||
else activateDarkMode()
|
||
|
||
const asideStatus = saveToLocal.get('aside-status')
|
||
if (asideStatus !== undefined) {
|
||
if (asideStatus === 'hide') {
|
||
document.documentElement.classList.add('hide-aside')
|
||
} else {
|
||
document.documentElement.classList.remove('hide-aside')
|
||
}
|
||
}
|
||
|
||
const detectApple = () => {
|
||
if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
|
||
document.documentElement.classList.add('apple')
|
||
}
|
||
}
|
||
detectApple()
|
||
})(window)</script><link rel="stylesheet" href="/css/background.css"><meta name="generator" content="Hexo 6.3.0"><link rel="alternate" href="/atom.xml" title="一只攻城狮的学习之旅" type="application/atom+xml">
|
||
<link rel="alternate" href="/rss2.xml" title="一只攻城狮的学习之旅" type="application/rss+xml">
|
||
</head><body><script>window.paceOptions = {
|
||
restartOnPushState: false
|
||
}
|
||
|
||
document.addEventListener('pjax:send', () => {
|
||
Pace.restart()
|
||
})
|
||
</script><link rel="stylesheet" href="/css/loading.css"/><script src="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/pace.min.js"></script><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "/img/loading.gif" data-lazy-src="https://zyjblogs.cn/logo.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">26</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">22</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">9</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fa-fw fas fa-compass"></i><span> 目录</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 媒体</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/bangumis"><i class="fa-fw fa-fw fab fa-youtube"></i><span> 番剧</span></a></li></ul></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="https://gogs.zyjblogs.cn"><i class="fa-fw fa fa-code"></i><span> 仓库</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="not-home-page" id="page-header" style="background-image: url('/img/background.jpg')"><nav id="nav"><span id="blog-info"><a href="/" title="一只攻城狮的学习之旅"><span class="site-name">一只攻城狮的学习之旅</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fa-fw fas fa-compass"></i><span> 目录</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 媒体</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/bangumis"><i class="fa-fw fa-fw fab fa-youtube"></i><span> 番剧</span></a></li></ul></div><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="https://gogs.zyjblogs.cn"><i class="fa-fw fa fa-code"></i><span> 仓库</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="page-site-info"><h1 id="site-title">java</h1></div></header><main class="layout" id="content-inner"><div class="recent-posts category_ui" id="recent-posts"><div class="recent-post-item"><div class="post_cover left"><a href="/posts/f5786ffa.html" title="详细分析JDK中Stream的实现原理"><img class="post-bg" src= "/img/loading.gif" data-lazy-src="/img/background.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="详细分析JDK中Stream的实现原理"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/f5786ffa.html" title="详细分析JDK中Stream的实现原理">详细分析JDK中Stream的实现原理</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-03-19T06:24:23.059Z" title="发表于 2024-03-19 14:24:23">2024-03-19</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/java/">java</a></span></div><div class="content">详细分析JDK中Stream的实现原理前提Stream是JDK1.8中首次引入的,距今已经过去了接近8年时间(JDK1.8正式版是2013年底发布的)。Stream的引入一方面极大地简化了某些开发场景,另一方面也可能降低了编码的可读性(确实有不少人说到Stream会降低代码的可读性,但是在笔者看来,熟练使用之后反而觉得代码的可读性提高了)。这篇文章会花巨量篇幅,详细分析Stream的底层实现原理,参考的源码是JDK11的源码,其他版本JDK可能不适用于本文中的源码展示和相关例子。
|
||
|
||
这篇文章花费了极多时间和精力梳理和编写,希望能够帮助到本文的读者
|
||
|
||
Stream是如何做到向前兼容的Stream是JDK1.8引入的,如要需要JDK1.7或者以前的代码也能在JDK1.8或以上运行,那么Stream的引入必定不能在原来已经发布的接口方法进行修改,否则必定会因为兼容性问题导致老版本的接口实现无法在新版本中运行(方法签名出现异常),猜测是基于这个问题引入了接口默认方法,也就是default关键字。查看源码可以发现,ArrayList的超类Collection和Iterable分别添加了数个def ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/posts/39831.html" title="微服务框架"><img class="post-bg" src= "/img/loading.gif" data-lazy-src="/img/background.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="微服务框架"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/39831.html" title="微服务框架">微服务框架</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-08-06T16:00:00.000Z" title="发表于 2021-08-07 00:00:00">2021-08-07</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/java/">java</a></span></div><div class="content">微服务框架[TOC]
|
||
一、SpringCloud介绍1.1 微服务架构
|
||
https://martinfowler.com/articles/microservices.html
|
||
微服务架构提出者:马丁福勒
|
||
|
||
|
||
简而言之,微服务体系结构[样式 1]是一种将单个应用程序开发为一组小型服务的方法,每个应用程序在自己的进程中运行,并与轻量级机制(通常是 HTTP 资源 API)通信。这些服务围绕业务功能构建,可通过全自动部署机制独立部署。这些服务的集中管理最少,可能以不同的编程语言编写,并使用不同的数据存储技术。
|
||
|
||
1.2 SpringCloud介绍
|
||
SpringCloud是微服务架构落地的一套技术栈
|
||
SpringCloud中的大多数技术都是基于Netflix公司的技术进行第二次开发。
|
||
1、SpringCloud的中文社区网站:http://springcloud.cn/
|
||
2、SpringCloud的中文网 :http://springcloud.cc/
|
||
八个技术点:
|
||
1、Eureka - 服务的注册与发现
|
||
2、Robbn - 服务之间的负载均衡
|
||
3、Feign - 服务之间的通讯
|
||
4、Hys ...</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src= "/img/loading.gif" data-lazy-src="https://zyjblogs.cn/logo.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">逝水无痕</div><div class="author-info__description">给时光以生命,给岁月以文明</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">26</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">22</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">9</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/zyjnicemoe"><i class="fab fa-github"></i><span>GitHub主页</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/zyjnicemoe" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:1317453947@qq.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a><a class="social-icon" href="/atom.xml" target="_blank" title=""><i class="fas fa-rss"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content"><a href="https://zyjblogs.cn">逝水无痕の博客https://zyjblogs.cn迁移到此</a></div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/posts/97da918c.html" title="C++编码优化之减少冗余拷贝或赋值"><img src= "/img/loading.gif" data-lazy-src="/img/background.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="C++编码优化之减少冗余拷贝或赋值"/></a><div class="content"><a class="title" href="/posts/97da918c.html" title="C++编码优化之减少冗余拷贝或赋值">C++编码优化之减少冗余拷贝或赋值</a><time datetime="2024-03-19T06:32:03.211Z" title="发表于 2024-03-19 14:32:03">2024-03-19</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/0.html" title="C语言中三块难啃的硬骨头"><img src= "/img/loading.gif" data-lazy-src="/img/background.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="C语言中三块难啃的硬骨头"/></a><div class="content"><a class="title" href="/posts/0.html" title="C语言中三块难啃的硬骨头">C语言中三块难啃的硬骨头</a><time datetime="2024-03-19T06:29:41.998Z" title="发表于 2024-03-19 14:29:41">2024-03-19</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/97623f3c.html" title="一起探索C++类内存分布"><img src= "/img/loading.gif" data-lazy-src="/img/background.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="一起探索C++类内存分布"/></a><div class="content"><a class="title" href="/posts/97623f3c.html" title="一起探索C++类内存分布">一起探索C++类内存分布</a><time datetime="2024-03-19T06:28:04.302Z" title="发表于 2024-03-19 14:28:04">2024-03-19</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/b57ba5ed.html" title="C++内存管理"><img src= "/img/loading.gif" data-lazy-src="/img/background.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="C++内存管理"/></a><div class="content"><a class="title" href="/posts/b57ba5ed.html" title="C++内存管理">C++内存管理</a><time datetime="2024-03-19T06:27:19.919Z" title="发表于 2024-03-19 14:27:19">2024-03-19</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/f5786ffa.html" title="详细分析JDK中Stream的实现原理"><img src= "/img/loading.gif" data-lazy-src="/img/background.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="详细分析JDK中Stream的实现原理"/></a><div class="content"><a class="title" href="/posts/f5786ffa.html" title="详细分析JDK中Stream的实现原理">详细分析JDK中Stream的实现原理</a><time datetime="2024-03-19T06:24:23.059Z" title="发表于 2024-03-19 14:24:23">2024-03-19</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
|
||
<i class="fas fa-folder-open"></i>
|
||
<span>分类</span>
|
||
<a class="card-more-btn" href="/categories/" title="查看更多">
|
||
<i class="fas fa-angle-right"></i></a>
|
||
</div>
|
||
<ul class="card-category-list" id="aside-cat-list">
|
||
<li class="card-category-list-item "><a class="card-category-list-link" href="/categories/c/"><span class="card-category-list-name">c++</span><span class="card-category-list-count">11</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/java/"><span class="card-category-list-name">java</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E4%B9%A6/"><span class="card-category-list-name">书</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E5%A4%9A%E7%BA%BF%E7%A8%8B/"><span class="card-category-list-name">多线程</span><span class="card-category-list-count">2</span></a><ul class="card-category-list child"><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E5%A4%9A%E7%BA%BF%E7%A8%8B/java/"><span class="card-category-list-name">java</span><span class="card-category-list-count">2</span></a></li></ul></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/"><span class="card-category-list-name">数据结构</span><span class="card-category-list-count">3</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E7%AE%97%E6%B3%95/"><span class="card-category-list-name">算法</span><span class="card-category-list-count">5</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E7%BD%91%E7%BB%9C/"><span class="card-category-list-name">网络</span><span class="card-category-list-count">1</span></a></li>
|
||
</ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/tags/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/" style="font-size: 1.15em; color: rgb(10, 72, 10)">数据结构</a><a href="/tags/c/" style="font-size: 1.15em; color: rgb(179, 51, 191)">c</a><a href="/tags/c/" style="font-size: 1.45em; color: rgb(52, 6, 167)">c++</a><a href="/tags/hashmap/" style="font-size: 1.22em; color: rgb(63, 179, 102)">hashmap</a><a href="/tags/%E7%AE%97%E6%B3%95/" style="font-size: 1.3em; color: rgb(111, 146, 66)">算法</a><a href="/tags/%E5%9B%9E%E6%BA%AF/" style="font-size: 1.15em; color: rgb(64, 135, 65)">回溯</a><a href="/tags/%E9%80%92%E5%BD%92/" style="font-size: 1.15em; color: rgb(59, 39, 83)">递归</a><a href="/tags/springcloud/" style="font-size: 1.15em; color: rgb(176, 122, 9)">springcloud</a><a href="/tags/java/" style="font-size: 1.38em; color: rgb(58, 30, 24)">java</a><a href="/tags/%E6%9F%A5%E6%89%BE/" style="font-size: 1.15em; color: rgb(20, 75, 113)">查找</a><a href="/tags/%E6%A0%91/" style="font-size: 1.15em; color: rgb(135, 145, 170)">树</a><a href="/tags/dp/" style="font-size: 1.15em; color: rgb(0, 115, 86)">dp</a><a href="/tags/%E5%B9%B6%E6%9F%A5%E9%9B%86/" style="font-size: 1.15em; color: rgb(37, 167, 67)">并查集</a><a href="/tags/%E5%9B%BE/" style="font-size: 1.22em; color: rgb(180, 136, 179)">图</a><a href="/tags/chrono/" style="font-size: 1.15em; color: rgb(61, 16, 90)">chrono</a><a href="/tags/cJson/" style="font-size: 1.15em; color: rgb(29, 164, 167)">cJson</a><a href="/tags/%E5%90%8E%E7%AB%AF/" style="font-size: 1.22em; color: rgb(65, 95, 94)">后端</a><a href="/tags/memory/" style="font-size: 1.22em; color: rgb(182, 107, 39)">memory</a><a href="/tags/%E6%8C%87%E9%92%88/" style="font-size: 1.15em; color: rgb(59, 193, 5)">指针</a><a href="/tags/%E7%BD%91%E7%BB%9C/" style="font-size: 1.15em; color: rgb(197, 34, 127)">网络</a><a href="/tags/%E5%A4%9A%E7%BA%BF%E7%A8%8B/" style="font-size: 1.22em; color: rgb(2, 89, 22)">多线程</a><a href="/tags/stream/" style="font-size: 1.15em; color: rgb(21, 39, 193)">stream</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/03/"><span class="card-archive-list-date">三月 2024</span><span class="card-archive-list-count">12</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/10/"><span class="card-archive-list-date">十月 2023</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/02/"><span class="card-archive-list-date">二月 2022</span><span class="card-archive-list-count">7</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/08/"><span class="card-archive-list-date">八月 2021</span><span class="card-archive-list-count">5</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">26</div></div><div class="webinfo-item"><div class="item-name">已运行时间 :</div><div class="item-count" id="runtimeshow" data-publishDate="2018-06-06T16:00:00.000Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总字数 :</div><div class="item-count">160.4k</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2024-10-19T05:42:59.717Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">©2019 - 2024 By 逝水无痕</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text"><div><img style="padding-top:2px" src= "/img/loading.gif" data-lazy-src="https://sp-ao.shortpixel.ai/client/q_glossy,ret_img/https://zyjblogs.cn/img/icp.png"><a class="banquan" style="color:#000" href="https://beian.miit.gov.cn/" target="_blank" data-pjax-state="">鄂ICP备19023232号</a></div></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/fancyapps-ui/5.0.24/fancybox/fancybox.umd.min.js"></script><script src="https://jsd.cdn.zzko.cn/npm/instant.page/instantpage.min.js" type="module"></script><script src="https://jsd.cdn.zzko.cn/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><div class="js-pjax"></div><script src="https://jsd.cdn.zzko.cn/npm/butterfly-extsrc@1/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
|
||
POWERMODE.shake = false;
|
||
POWERMODE.mobile = false;
|
||
document.body.addEventListener('input', POWERMODE);
|
||
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/pjax/0.2.8/pjax.min.js"></script><script>let pjaxSelectors = ["head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"]
|
||
|
||
var pjax = new Pjax({
|
||
elements: 'a:not([target="_blank"]):not([href="/talking/"])',
|
||
selectors: pjaxSelectors,
|
||
cacheBust: false,
|
||
analytics: false,
|
||
scrollRestoration: false
|
||
})
|
||
|
||
document.addEventListener('pjax:send', function () {
|
||
|
||
// removeEventListener
|
||
btf.removeGlobalFnEvent('pjax')
|
||
btf.removeGlobalFnEvent('themeChange')
|
||
|
||
document.getElementById('rightside').classList.remove('rightside-show')
|
||
|
||
if (window.aplayers) {
|
||
for (let i = 0; i < window.aplayers.length; i++) {
|
||
if (!window.aplayers[i].options.fixed) {
|
||
window.aplayers[i].destroy()
|
||
}
|
||
}
|
||
}
|
||
|
||
typeof typed === 'object' && typed.destroy()
|
||
|
||
//reset readmode
|
||
const $bodyClassList = document.body.classList
|
||
$bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')
|
||
|
||
typeof disqusjs === 'object' && disqusjs.destroy()
|
||
})
|
||
|
||
document.addEventListener('pjax:complete', function () {
|
||
window.refreshFn()
|
||
|
||
document.querySelectorAll('script[data-pjax]').forEach(item => {
|
||
const newScript = document.createElement('script')
|
||
const content = item.text || item.textContent || item.innerHTML || ""
|
||
Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
|
||
newScript.appendChild(document.createTextNode(content))
|
||
item.parentNode.replaceChild(newScript, item)
|
||
})
|
||
|
||
GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()
|
||
|
||
typeof panguInit === 'function' && panguInit()
|
||
|
||
// google analytics
|
||
typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});
|
||
|
||
// baidu analytics
|
||
typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);
|
||
|
||
typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()
|
||
|
||
// prismjs
|
||
typeof Prism === 'object' && Prism.highlightAll()
|
||
})
|
||
|
||
document.addEventListener('pjax:error', e => {
|
||
if (e.request.status === 404) {
|
||
pjax.loadUrl('/404.html')
|
||
}
|
||
})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span> 数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/js/search/local-search.js"></script></div></div></body></html> |