JasonsGong.github.io/page/3/index.html
2024-06-14 22:00:25 +08:00

425 lines
53 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>The Blog</title><meta name="author" content="Jason"><meta name="copyright" content="Jason"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="Debug the World">
<meta property="og:type" content="website">
<meta property="og:title" content="The Blog">
<meta property="og:url" content="https://qingling.icu/page/3/index.html">
<meta property="og:site_name" content="The Blog">
<meta property="og:description" content="Debug the World">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://qingling.icu/img/avatar.jpg">
<meta property="article:author" content="Jason">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://qingling.icu/img/avatar.jpg"><link rel="shortcut icon" href="/img/%E5%9B%BE%E6%A0%87.png"><link rel="canonical" href="https://qingling.icu/page/3/index.html"><link rel="preconnect" href="//fastly.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="/cdn/icon/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="/cdn/css/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="/cdn/css/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
root: '/',
algolia: undefined,
localSearch: {"path":"/search.xml","preload":true,"top_n_per_article":1,"unescape":false,"languages":{"hits_empty":"找不到您查询的内容:${query}","hits_stats":"共找到 ${hits} 篇文章"}},
translate: undefined,
noticeOutdate: undefined,
highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":400},
copy: {
success: '复制成功',
error: '复制错误',
noSupport: '浏览器不支持'
},
relativeDate: {
homepage: true,
post: true
},
runtime: '天',
dateSuffix: {
just: '刚刚',
min: '分钟前',
hour: '小时前',
day: '天前',
month: '个月前'
},
copyright: undefined,
lightbox: 'mediumZoom',
Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#006650","bgDark":"#006650","position":"top-center"},
source: {
justifiedGallery: {
js: 'https://fastly.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
css: 'https://fastly.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
}
},
isPhotoFigcaption: false,
islazyload: false,
isAnchor: true,
percent: {
toc: true,
rightside: false,
},
autoDarkmode: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: 'The Blog',
isPost: false,
isHome: true,
isHighlightShrink: false,
isToc: false,
postUpdate: '2024-06-14 22:00:10'
}</script><noscript><style type="text/css">
#nav {
opacity: 1
}
.justified-gallery img {
opacity: 1
}
#recent-posts time,
#post-meta time {
display: inline !important
}
</style></noscript><script>(win=>{
win.saveToLocal = {
set: function setWithExpiry(key, value, ttl) {
if (ttl === 0) return
const now = new Date()
const expiryDay = ttl * 86400000
const item = {
value: value,
expiry: now.getTime() + expiryDay,
}
localStorage.setItem(key, JSON.stringify(item))
},
get: function getWithExpiry(key) {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = new Date()
if (now.getTime() > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}
win.getScript = url => 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()
}
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 = function () {
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 = function () {
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 <= 8 || hour >= 22
isNight ? activateDarkMode() : activateLightMode()
}
window.matchMedia('(prefers-color-scheme: dark)').addListener(function (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><script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script><script type="text/javascript" src ="/js/welcome.js" ></script><script src="/js/sweetalert.js"></script><link rel="stylesheet" href="/css/sweetalert.css"><!-- hexo injector head_end start --><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiper.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiperstyle.css" media="print" onload="this.media='all'"><!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.3.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/img/avatar.jpg" onerror="onerror=null;src='/img/loading.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">60</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">39</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">10</div></a></div><br/><div class="menus_items"><div class="menus_item"><a class="site-page" target="_blank" rel="noopener" href="https://www.tutorialspoint.com/compile_java8_online.php"><i class="fa-fw fas fa-code"></i><span> 代码</span></a></div><div class="menus_item"><a class="site-page" href="/notice/"><i class="fa-fw fas fa-stream"></i><span> 公告</span></a></div><div class="menus_item"><a class="site-page" href="/website/"><i class="fa-fw fas fa-list"></i><span> 网址</span></a></div><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="not-top-img" id="page-header"><nav id="nav"><span id="blog-info"><a href="/" title="The Blog"><img class="site-icon" src="/img/logo.png"/><span class="site-name">The Blog</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" target="_blank" rel="noopener" href="https://www.tutorialspoint.com/compile_java8_online.php"><i class="fa-fw fas fa-code"></i><span> 代码</span></a></div><div class="menus_item"><a class="site-page" href="/notice/"><i class="fa-fw fas fa-stream"></i><span> 公告</span></a></div><div class="menus_item"><a class="site-page" href="/website/"><i class="fa-fw fas fa-list"></i><span> 网址</span></a></div><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></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></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item" style="width:100%;height:auto;"><img src="https://ghchart.rshah.org/008000/JasonsGong" alt style="width:100%;height:100%;padding-left: 2em;padding-right: 2em;padding-top: 1.2em;padding-bottom: 1.5em;"></div><div class="recent-post-item"><div class="post_cover left"><a href="/posts/1416.html" title="压力测试与性能监控"><img class="post-bg" src="/img/7.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="压力测试与性能监控"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/1416.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 class="post-meta-date-created" datetime="2023-07-09T08:00:10.000Z" title="发表于 2023-07-09 16:00:10">2023-07-09</time><span class="article-meta-separator">|</span><i class="fas fa-history"></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-01-05T13:51:58.807Z" title="更新于 2024-01-05 21:51:58">2024-01-05</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/%E6%B5%8B%E8%AF%95/">测试</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/%E6%B5%8B%E8%AF%95/">测试</a></span></div><div class="content">一.压力测试性能指标
响应时间Response Time: RT响应时间指用户从客户端发起一个请求开始到客户端接收到从服务器端返回的响应结束整个过程所耗费的时间。
HPSHits Per Second :每秒点击次数,单位是次&#x2F;秒。
TPSTransaction per Second系统每秒处理交易数单位是笔&#x2F;秒。
QPSQuery per Second系统每秒处理查询次数单位是次&#x2F;秒。对于互联网业务中,如果某些业务有且仅有一个请求连接,那么 TPS&#x3D;QPS&#x3D;HPS一般情况下用 TPS 来衡量整个业务流程,用 QPS 来衡量接口查询次数,用 HPS 来表示对服务器单击请求。
无论 TPS、QPS、HPS,此指标是衡量系统处理能力非常重要的指标,越大越好,根据经验,一般情况下:
金融行业1000TPS~50000TPS不包括互联网化的活动
保险行业100TPS~100000TPS不包括互联网化的活动
制造行业10TPS~5000TPS
互联网电子商务10000TPS~1000000TPS ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/posts/54835.html" title="Thymeleaf教程"><img class="post-bg" src="/img/6.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Thymeleaf教程"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/54835.html" title="Thymeleaf教程">Thymeleaf教程</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 class="post-meta-date-created" datetime="2023-07-06T07:50:10.000Z" title="发表于 2023-07-06 15:50:10">2023-07-06</time><span class="article-meta-separator">|</span><i class="fas fa-history"></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-09-11T23:36:50.000Z" title="更新于 2023-09-12 07:36:50">2023-09-12</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/%E5%89%8D%E7%AB%AF/">前端</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/Thymeleaf/">Thymeleaf</a></span></div><div class="content">Thymeleaf 是一个服务器端 Java 模板引擎,能够处理 HTML、XML、CSS、JAVASCRIPT 等模板文件。Thymeleaf 模板可以直接当作静态原型来使用,它主要目标是为开发者的开发工作流程带来优雅的自然模板,也是 Java 服务器端 HTML5 开发的理想选择。
教程: https://www.thymeleaf.org
项目集成Thymeleaf1.导入依赖
12345&lt;!-- thymeleaf--&gt;&lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-starter-thymeleaf&lt;/artifactId&gt;&lt;/dependency&gt;
2.添加配置
1spring.thymeleaf.cache=false #关闭缓存后面使用devtools进行热更新也要关闭缓存
3.在HTML文件中引入名称空间
1&lt;html xmlns:th=&quo ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/posts/22654.html" title="ElasticSearch"><img class="post-bg" src="/img/3.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="ElasticSearch"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/22654.html" title="ElasticSearch">ElasticSearch</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 class="post-meta-date-created" datetime="2023-06-28T09:30:26.000Z" title="发表于 2023-06-28 17:30:26">2023-06-28</time><span class="article-meta-separator">|</span><i class="fas fa-history"></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-09-11T23:36:52.000Z" title="更新于 2023-09-12 07:36:52">2023-09-12</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/%E5%90%8E%E7%AB%AF/">后端</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/ElasticSearch/">ElasticSearch</a></span></div><div class="content">官网: https://www.elastic.co/cn/elasticsearch/
简介​ Elasticsearch 是一个分布式、RESTful 风格的搜索和数据分析引擎,能够解决不断涌现出的各种用例。作为 Elastic Stack 的核心Elasticsearch 会集中存储您的数据,让您飞快完成搜索,微调相关性,进行强大的分析,并轻松缩放规模。
一.基本概念1.Index(索引)
动词:相当于mysql的insert
名词:相当于mysql的database
2.Type(类型)
在index中可以定义一个或者多个类型
类似于mysql中的Table每一种类型的数据放在一起
3.Document(文档)
保存在某个索引(index)下,某种类型(Type)的一个数据(Document),文档是JSON格式的
Document就是像mysql中的某个Table里面的内容。
4.倒排索引
二.Docker安装ElasticSearch1.安装ElasticSearch(存储和检索数据)1234567891011121314151617181920212223242 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/posts/27166.html" title="数据校验"><img class="post-bg" src="/img/4.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="数据校验"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/27166.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 class="post-meta-date-created" datetime="2023-06-12T08:54:11.000Z" title="发表于 2023-06-12 16:54:11">2023-06-12</time><span class="article-meta-separator">|</span><i class="fas fa-history"></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-09-11T23:36:48.000Z" title="更新于 2023-09-12 07:36:48">2023-09-12</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/%E5%90%8E%E7%AB%AF/">后端</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/Java/">Java</a></span></div><div class="content"> 在前端接收数据和前端向后端传递数据的时候,都需要进行数据校验,避免传入错误的信息,比如在需要传入一个非空的值时,传入了一个空字符串,需要传入邮箱号码的时候,传入的非邮箱格式的数据。同时在写接口时经常要写效验请求参数逻辑,这时候我们会常用做法是写大量的 if 与 if else 类似这样的代码大量if-else代码看起来比较混乱降低了代码的可读性。
一.JSR303数据校验1.引入依赖12345&lt;dependency&gt; &lt;groupId&gt;org.hibernate&lt;/groupId&gt; &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt; &lt;version&gt;6.0.7.Final&lt;/version&gt;&lt;/dependency&gt;
2.给实体类添加校验注解并定义自己的message提示常用的检验注解
示例
123456789101112131415161718192021222324252627282930313233343536 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/posts/20683.html" title="Linux中开发环境的搭建"><img class="post-bg" src="/img/8.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Linux中开发环境的搭建"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/20683.html" title="Linux中开发环境的搭建">Linux中开发环境的搭建</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 class="post-meta-date-created" datetime="2023-06-05T02:17:19.000Z" title="发表于 2023-06-05 10:17:19">2023-06-05</time><span class="article-meta-separator">|</span><i class="fas fa-history"></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-05-10T05:31:11.669Z" title="更新于 2024-05-10 13:31:11">2024-05-10</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/%E8%BF%90%E7%BB%B4/">运维</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/">环境搭建</a><span class="article-meta-link"></span><a class="article-meta__tags" href="/tags/Linux/">Linux</a></span></div><div class="content">一.Linux操作系统的安装与配置软件:VMware 、Linux镜像文件VMWare虚拟机安装Linux教程 | The Blog (qingling.icu)
二.配置Java环境2.1.删除自带的JDK
123456#查看系统是否有java环境java -version# 查找Linux中已有的java环境的相关文件rpm -qa |grep java# 执行命令 删除上面的java文件rpm -e --nodeps +上面查找出来的文件
2.2.安装JDK
12345678910111213141516#创建一个文件夹将JDK8上传到这个文件夹中去mkdir /opt/jdk# 解压上传的压缩包 解压后得到一个名为jdk1.8.0_261的文件夹tar -zvxf jdk-8u261-linux-x64.tar.gz# 创建一个目录作为java的安装目录mkdir /usr/local/java#将解压后的文件移动到这个安装目录中去mv jdk1.8.0_261/ /usr/local/java/#配置环境变量#进入环境变量的配置文件中vim /etc/profile#在 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/posts/63333.html" title="开发环境的搭建"><img class="post-bg" src="/img/10.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="开发环境的搭建"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/63333.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 class="post-meta-date-created" datetime="2023-06-03T03:55:06.000Z" title="发表于 2023-06-03 11:55:06">2023-06-03</time><span class="article-meta-separator">|</span><i class="fas fa-history"></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-09-11T23:36:50.000Z" title="更新于 2023-09-12 07:36:50">2023-09-12</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/%E5%90%8E%E7%AB%AF/">后端</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/">环境搭建</a></span></div><div class="content">1.后端环境搭建1.1 JDK环境的配置常规的安装无需教程
IDEA中设置默认的JDK
选中需要设置为默认JDK的JDK
1.2 Maven的安装与配置环境变量的配置
MAVEN_HOME和Path 配置文件的配置
设置默认maven每次创建新的工程的时候就会使用这个maven
然后在弹出的页面中设置这样每次创建新的工程就会使用当前设置的maven
1.3 IDEA的配置展开目录树 取消勾选下面的选项
快捷键的配置 IDEA中的全局查找的快捷键会和windows的中文的繁简字体切换的快捷键冲突直接关掉系统的快捷键
页面中字体的配置
代码字体的配置
设置代码粗体
打开的多个文件多行显示,不在同一行显示
浅色主题的配置
修改注释的颜色
修改多行注释的颜色: 修改Doc comment -&gt; Text的颜色
1.4 mysql的安装具体的安装教程在《MySql5.7的安装教程的博客中》
1.5 Nacos的安装配置github下载之后直接解压运行
下载的地址:https://github.com/alibaba/nacos/release ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/posts/50908.html" title="ElementUI使用示例"><img class="post-bg" src="/img/8.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="ElementUI使用示例"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/50908.html" title="ElementUI使用示例">ElementUI使用示例</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 class="post-meta-date-created" datetime="2023-05-30T09:41:35.000Z" title="发表于 2023-05-30 17:41:35">2023-05-30</time><span class="article-meta-separator">|</span><i class="fas fa-history"></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-09-11T23:36:52.000Z" title="更新于 2023-09-12 07:36:52">2023-09-12</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/%E5%89%8D%E7%AB%AF/">前端</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/%E5%89%8D%E7%AB%AF/">前端</a></span></div><div class="content">ElementUI官网
一.树形显示-树形控件1.树形显示示例-以谷粒商城项目的商品分类为例
数据中商品分类的数据表,所有的分类数据在同一张表中
商品分类的实体类
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566package com.atguigu.gulimall.product.entity;import com.baomidou.mybatisplus.annotation.TableField;import com.baomidou.mybatisplus.annotation.TableId;import com.baomidou.mybatisplus.annotation.TableName;import java.io.Serializable;import java.util.Date;import java.util.List;import lombok.Data; ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/posts/53306.html" title="Mybatis-Plus的使用教程"><img class="post-bg" src="/img/3.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Mybatis-Plus的使用教程"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/53306.html" title="Mybatis-Plus的使用教程">Mybatis-Plus的使用教程</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 class="post-meta-date-created" datetime="2023-05-25T01:06:40.000Z" title="发表于 2023-05-25 09:06:40">2023-05-25</time><span class="article-meta-separator">|</span><i class="fas fa-history"></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-09-11T23:36:52.000Z" title="更新于 2023-09-12 07:36:52">2023-09-12</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/%E5%90%8E%E7%AB%AF/">后端</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/SSM/">SSM</a></span></div><div class="content">官方文档:MyBatis-Plus
常用插件1.公共字段填充​ 对于每个实体类共有的属性字段例如创建时间、修改时间、创建人、修改人我们可以使用公共字段填充来统一填充这些字段这样我们在创建这些实体类的对象的时候就不需要set这些属性实现丝滑开发
1234@TableField(fill = FieldFill.INSERT) //插入的时候填充private String gmtCreate;@TableField(fill = FieldFill.INSERT_UPDATE)//插入和修改的时候填充private String gmtModified;
第一种配置的方法
123456789101112131415161718192021222324252627282930313233343536373839package com.itheima.config;import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;import org.apache.ibatis.reflection.MetaObje ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/posts/18459.html" title="Git命令速查"><img class="post-bg" src="/img/6.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Git命令速查"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/18459.html" title="Git命令速查">Git命令速查</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 class="post-meta-date-created" datetime="2023-05-20T09:28:30.000Z" title="发表于 2023-05-20 17:28:30">2023-05-20</time><span class="article-meta-separator">|</span><i class="fas fa-history"></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-04-02T02:53:33.764Z" title="更新于 2024-04-02 10:53:33">2024-04-02</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/%E5%90%8E%E7%AB%AF/">后端</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/Git/">Git</a></span></div><div class="content">安装教程
官网下载:https://git-scm.com/downloads
123456789101112131415161718#以下的操作在下载安装完毕之后进行#1.鼠标在桌面右键 选择Git Bash Here 打开控制台#2.配置用户名和邮箱git config --global user.name &quot;用户名&quot; #随意git config --global user.email &quot;邮箱&quot; #自己的邮箱#3.配置SSH免密连接#生成密钥ssh-keygen -t rsa -C &quot;在码云上注册的邮箱地址&quot; #连续三次回车#查看密钥并复制公钥的内容cat ~/.ssh/id_rsa.pub#4.将密钥的复制到码云的SSH公钥中#4.1添加公钥 公钥名随意 公钥内容就是上面复制的内容#5.测试ssh -T git@gitee.com
常用命令
</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/posts/45726.html" title="项目实战-谷粒商城"><img class="post-bg" src="/img/8.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="项目实战-谷粒商城"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/45726.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 class="post-meta-date-created" datetime="2023-05-17T16:06:28.000Z" title="发表于 2023-05-18 00:06:28">2023-05-18</time><span class="article-meta-separator">|</span><i class="fas fa-history"></i><span class="article-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-05-10T05:31:11.623Z" title="更新于 2024-05-10 13:31:11">2024-05-10</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/%E5%90%8E%E7%AB%AF/">后端</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/%E9%A1%B9%E7%9B%AE%E5%AE%9E%E6%88%98/">项目实战</a></span></div><div class="content">一.项目简介1.项目背景电商模式 谷粒商城使用的B2C模式销售自营的商品给客户
市面上5种常见的电商模式B2B、B2C、C2B、C2C、O2O
1、B2B模式business to business是指商家与商家建立的商业关系。如阿里巴巴。
2、B2C模式business to consumer商对客模式。即通常说的商业零售供应商直接把商品卖给用户。如苏宁易购、京东、天猫、小米商城。
3、C2B模式customer to business即消费者对企业。先有消费者需求而后有企业生产。例如众筹类的商城。
4、C2C模式customer to consumer客户之间直接把东西放上网上去卖。如淘宝、闲鱼。
5、O2O模式online to offline线上线下。线上快速支付线下优质服务。如饿了么、美团、京东到家。
2.项目架构图项目的架构图
微服务划分图
3.项目技术和特色
前后端分离开发开发基于VUE的后台管理系统
SpringCloud全新解决方案
应用监控、限流、网关、熔断降级等分布式方案 全方位涉及
包含分布式事务、分布式锁等技术难点
分析 ...</div></div></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/page/2/#content-inner"><i class="fas fa-chevron-left fa-fw"></i></a><a class="page-number" href="/">1</a><a class="page-number" href="/page/2/#content-inner">2</a><span class="page-number current">3</span><a class="page-number" href="/page/4/#content-inner">4</a><span class="space">&hellip;</span><a class="page-number" href="/page/6/#content-inner">6</a><a class="extend next" rel="next" href="/page/4/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></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/avatar.jpg" onerror="this.onerror=null;this.src='/img/loading.gif'" alt="avatar"/></div><div class="author-info__name">Jason</div><div class="author-info__description">Debug the World</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">60</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">39</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">10</div></a></div><a id="card-info-btn"><i class="fab fa-microsoft"></i><span>Ctrl + D 收藏</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/JasonsGong" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="tencent://AddContact/?fromId=45&amp;fromSubId=1&amp;subcmd=all&amp;uin=2602183349&amp;website=www.oicqzone.com" target="_blank" title="QQ"><i class="fab fa-qq"></i></a><a class="social-icon" href="mailto:2602183349@qq.com" target="_blank" title="Email"><i class="fas fa-envelope-open-text"></i></a><a class="social-icon" href="https://github.com/JasonsGong?tab=repositories" target="_blank" title="代码仓库"><i class="fas fa-database"></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">本网站是静态网站,更新页面资源请使用Ctrl+F5;若网站内文章对你有帮助,请使用Ctrl+D收藏该网站</div></div><!-- !=partial('includes/widget/card_weather', {}, {cache: true})--><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/8957.html" title="Linux从入门到进阶"><img src="/img/8.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Linux从入门到进阶"/></a><div class="content"><a class="title" href="/posts/8957.html" title="Linux从入门到进阶">Linux从入门到进阶</a><time datetime="2024-05-10T05:31:11.691Z" title="更新于 2024-05-10 13:31:11">2024-05-10</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/35630.html" title="接口测试工具"><img src="/img/2.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="接口测试工具"/></a><div class="content"><a class="title" href="/posts/35630.html" title="接口测试工具">接口测试工具</a><time datetime="2024-05-10T05:31:11.686Z" title="更新于 2024-05-10 13:31:11">2024-05-10</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/32246.html" title="SpringBoot中整合Swagger2"><img src="/img/3.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="SpringBoot中整合Swagger2"/></a><div class="content"><a class="title" href="/posts/32246.html" title="SpringBoot中整合Swagger2">SpringBoot中整合Swagger2</a><time datetime="2024-05-10T05:31:11.681Z" title="更新于 2024-05-10 13:31:11">2024-05-10</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/19306.html" title="Docker容器化技术"><img src="/img/1.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Docker容器化技术"/></a><div class="content"><a class="title" href="/posts/19306.html" title="Docker容器化技术">Docker容器化技术</a><time datetime="2024-05-10T05:31:11.675Z" title="更新于 2024-05-10 13:31:11">2024-05-10</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/20683.html" title="Linux中开发环境的搭建"><img src="/img/8.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Linux中开发环境的搭建"/></a><div class="content"><a class="title" href="/posts/20683.html" title="Linux中开发环境的搭建">Linux中开发环境的搭建</a><time datetime="2024-05-10T05:31:11.669Z" title="更新于 2024-05-10 13:31:11">2024-05-10</time></div></div></div></div><div class="card-widget" id="card-newest-comments"><div class="item-headline"><i class="far fa-comment-alt"></i><span>最新评论</span></div><div class="aside-list"><span>正在加载中...</span></div></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/DFA/" style="font-size: 1.15em; color: rgb(5, 156, 63)">DFA</a><a href="/tags/Docker/" style="font-size: 1.15em; color: rgb(143, 193, 156)">Docker</a><a href="/tags/%E5%89%8D%E7%AB%AF/" style="font-size: 1.22em; color: rgb(120, 75, 20)">前端</a><a href="/tags/%E5%BF%AB%E6%8D%B7%E9%94%AE/" style="font-size: 1.15em; color: rgb(30, 115, 80)">快捷键</a><a href="/tags/Java/" style="font-size: 1.38em; color: rgb(107, 6, 23)">Java</a><a href="/tags/FreeMarker/" style="font-size: 1.15em; color: rgb(36, 50, 34)">FreeMarker</a><a href="/tags/%E7%88%AC%E8%99%AB/" style="font-size: 1.15em; color: rgb(178, 164, 98)">爬虫</a><a href="/tags/Git/" style="font-size: 1.15em; color: rgb(45, 7, 65)">Git</a><a href="/tags/%E4%BA%8C%E7%BB%B4%E7%A0%81/" style="font-size: 1.15em; color: rgb(155, 26, 3)">二维码</a><a href="/tags/%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/" style="font-size: 1.22em; color: rgb(141, 25, 9)">环境搭建</a><a href="/tags/Linux/" style="font-size: 1.3em; color: rgb(123, 64, 95)">Linux</a><a href="/tags/1Panel/" style="font-size: 1.15em; color: rgb(20, 81, 73)">1Panel</a><a href="/tags/ElasticSearch/" style="font-size: 1.15em; color: rgb(154, 76, 186)">ElasticSearch</a><a href="/tags/Mysql/" style="font-size: 1.22em; color: rgb(0, 54, 173)">Mysql</a><a href="/tags/%E6%8F%92%E4%BB%B6/" style="font-size: 1.15em; color: rgb(102, 22, 141)">插件</a><a href="/tags/SSM/" style="font-size: 1.22em; color: rgb(132, 6, 72)">SSM</a><a href="/tags/SpringBoot/" style="font-size: 1.45em; color: rgb(6, 64, 156)">SpringBoot</a><a href="/tags/OCR/" style="font-size: 1.15em; color: rgb(140, 10, 143)">OCR</a><a href="/tags/SpringCloud/" style="font-size: 1.15em; color: rgb(170, 195, 62)">SpringCloud</a><a href="/tags/Thymeleaf/" style="font-size: 1.15em; color: rgb(57, 36, 199)">Thymeleaf</a><a href="/tags/VMWare/" style="font-size: 1.15em; color: rgb(81, 41, 19)">VMWare</a><a href="/tags/%E6%B3%A8%E9%87%8A%E6%A8%A1%E6%9D%BF/" style="font-size: 1.15em; color: rgb(44, 8, 167)">注释模板</a><a href="/tags/%E8%84%9A%E6%9C%AC/" style="font-size: 1.15em; color: rgb(93, 193, 6)">脚本</a><a href="/tags/PDF/" style="font-size: 1.15em; color: rgb(58, 143, 111)">PDF</a><a href="/tags/%E7%BD%91%E7%BB%9C/" style="font-size: 1.15em; color: rgb(37, 31, 195)">网络</a><a href="/tags/%E5%9F%9F%E5%90%8D%E6%B3%A8%E5%86%8C/" style="font-size: 1.15em; color: rgb(58, 80, 200)">域名注册</a><a href="/tags/%E5%A4%A7%E6%95%B0%E6%8D%AE/" style="font-size: 1.15em; color: rgb(199, 193, 73)">大数据</a><a href="/tags/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F/" style="font-size: 1.15em; color: rgb(125, 52, 166)">正则表达式</a><a href="/tags/MinIo/" style="font-size: 1.15em; color: rgb(11, 121, 6)">MinIo</a><a href="/tags/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/" style="font-size: 1.22em; color: rgb(171, 120, 12)">数据结构与算法</a><a href="/tags/%E6%B5%8B%E8%AF%95/" style="font-size: 1.15em; color: rgb(69, 165, 52)">测试</a><a href="/tags/%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" style="font-size: 1.15em; color: rgb(29, 10, 17)">常用命令</a><a href="/tags/%E8%8B%A5%E4%BE%9D/" style="font-size: 1.15em; color: rgb(26, 64, 101)">若依</a><a href="/tags/%E5%B7%A5%E5%85%B7/" style="font-size: 1.15em; color: rgb(150, 126, 49)">工具</a><a href="/tags/%E7%89%B9%E6%AE%8A%E7%AC%A6%E5%8F%B7/" style="font-size: 1.15em; color: rgb(51, 71, 74)">特殊符号</a><a href="/tags/%E7%AE%80%E5%8E%86/" style="font-size: 1.15em; color: rgb(199, 132, 130)">简历</a><a href="/tags/%E4%BA%91%E8%AE%A1%E7%AE%97/" style="font-size: 1.15em; color: rgb(133, 115, 35)">云计算</a><a href="/tags/%E9%9D%A2%E8%AF%95/" style="font-size: 1.22em; color: rgb(182, 21, 120)">面试</a><a href="/tags/%E9%A1%B9%E7%9B%AE%E5%AE%9E%E6%88%98/" style="font-size: 1.22em; color: rgb(184, 107, 41)">项目实战</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span><a class="card-more-btn" href="/archives/" title="查看更多">
</a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/02/"><span class="card-archive-list-date">2024年02月</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/01/"><span class="card-archive-list-date">2024年01月</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/2023/12/"><span class="card-archive-list-date">2023年12月</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/2023/11/"><span class="card-archive-list-date">2023年11月</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/2023/10/"><span class="card-archive-list-date">2023年10月</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/09/"><span class="card-archive-list-date">2023年09月</span><span class="card-archive-list-count">5</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/08/"><span class="card-archive-list-date">2023年08月</span><span class="card-archive-list-count">6</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/07/"><span class="card-archive-list-date">2023年07月</span><span class="card-archive-list-count">3</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">60</div></div><div class="webinfo-item"><div class="item-name">已运行时间 :</div><div class="item-count" id="runtimeshow" data-publishDate="2023-02-28T16: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">329.2k</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-06-14T14:00:10.392Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"></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="/cdn/js/medium-zoom.min.js"></script><script src="/cdn/js/instantpage.min.js" type="module"></script><script src="/cdn/js/snackbar.min.js"></script><div class="js-pjax"></div><script>window.addEventListener('load', () => {
const changeContent = (content) => {
if (content === '') return content
content = content.replace(/<img.*?src="(.*?)"?[^\>]+>/ig, '[图片]') // replace image link
content = content.replace(/<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, '[链接]') // replace url
content = content.replace(/<pre><code>.*?<\/pre>/gi, '[代码]') // replace code
content = content.replace(/<[^>]+>/g,"") // remove html tag
if (content.length > 150) {
content = content.substring(0,150) + '...'
}
return content
}
const findTrueUrl = (array) => {
Promise.all(array.map(item =>
fetch(item.url).then(resp => resp.json()).then(data => {
const urlArray = data.body.match(/(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?/ig)
if (data.user.login === 'utterances-bot') {
return urlArray.pop()
} else {
return urlArray.shift()
}
})
)).then(res => {
array = array.map((i,index)=> {
return {
...i,
url: res[index]
}
})
saveToLocal.set('github-newest-comments', JSON.stringify(array), 10/(60*24))
generateHtml(array)
});
}
const getComment = () => {
fetch('https://api.github.com/repos/JasonsGong/BlogComment/issues/comments?sort=updated&direction=desc&per_page=5&page=1',{
"headers": {
Accept: 'application/vnd.github.v3.html+json'
}
})
.then(response => response.json())
.then(data => {
const githubArray = data.map(item => {
return {
'avatar': item.user.avatar_url,
'content': changeContent(item.body_html),
'nick': item.user.login,
'url': item.issue_url,
'date': item.updated_at,
'githubUrl': item.html_url
}
})
findTrueUrl(githubArray)
}).catch(e => {
const $dom = document.querySelector('#card-newest-comments .aside-list')
$dom.textContent= "无法获取评论,请确认相关配置是否正确"
})
}
const generateHtml = array => {
let result = ''
if (array.length) {
for (let i = 0; i < array.length; i++) {
result += '<div class=\'aside-list-item\'>'
if (true) {
const name = 'src'
result += `<a href='${array[i].url}' class='thumbnail'><img ${name}='${array[i].avatar}' alt='${array[i].nick}'></a>`
}
result += `<div class='content'>
<a class='comment' href='${array[i].url}' title='${array[i].content}'>${array[i].content}</a>
<div class='name'><span>${array[i].nick} / </span><time datetime="${array[i].date}">${btf.diffDate(array[i].date, true)}</time></div>
</div></div>`
}
} else {
result += '没有评论'
}
let $dom = document.querySelector('#card-newest-comments .aside-list')
$dom.innerHTML= result
window.lazyLoadInstance && window.lazyLoadInstance.update()
window.pjax && window.pjax.refresh($dom)
}
const newestCommentInit = () => {
if (document.querySelector('#card-newest-comments .aside-list')) {
const data = saveToLocal.get('github-newest-comments')
if (data) {
generateHtml(JSON.parse(data))
} else {
getComment()
}
}
}
newestCommentInit()
document.addEventListener('pjax:complete', newestCommentInit)
})</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><br/><div class="no-result" 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><!-- hexo injector body_end start --><script data-pjax>
function butterfly_swiper_injector_config(){
var parent_div_git = document.getElementById('recent-posts');
var item_html = '<div class="recent-post-item" style="height: auto;width: 100%"><div class="blog-slider swiper-container-fade swiper-container-horizontal" id="swiper_container"><div class="blog-slider__wrp swiper-wrapper" style="transition-duration: 0ms;"><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" href="posts/19306.html" alt=""><img width="48" height="48" src="/img/1.png" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2023-04-21</span><a class="blog-slider__title" href="posts/19306.html" alt="">Docker容器化技术</a><div class="blog-slider__text">Docker</div><a class="blog-slider__button" href="posts/19306.html" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" href="posts/47003.html" alt=""><img width="48" height="48" src="/img/5.png" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2023-03-10</span><a class="blog-slider__title" href="posts/47003.html" alt="">常用正则表达式大全</a><div class="blog-slider__text">正则表达式</div><a class="blog-slider__button" href="posts/47003.html" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" href="posts/20683.html" alt=""><img width="48" height="48" src="/img/8.png" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2023-06-05</span><a class="blog-slider__title" href="posts/20683.html" alt="">Linux中开发环境的搭建</a><div class="blog-slider__text">环境搭建</div><a class="blog-slider__button" href="posts/20683.html" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" href="posts/63333.html" alt=""><img width="48" height="48" src="/img/10.png" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2023-06-03</span><a class="blog-slider__title" href="posts/63333.html" alt="">开发环境的搭建</a><div class="blog-slider__text">环境搭建</div><a class="blog-slider__button" href="posts/63333.html" alt="">详情 </a></div></div></div><div class="blog-slider__pagination swiper-pagination-clickable swiper-pagination-bullets"></div></div></div>';
if (parent_div_git !== null && typeof parent_div_git !== 'undefined') {
parent_div_git.insertAdjacentHTML("afterbegin",item_html)
}
}
var elist = 'undefined'.split(',');
var cpage = location.pathname;
var epage = 'all';
var flag = 0;
for (var i=0;i<elist.length;i++){
if (cpage.includes(elist[i])){
flag++;
}
}
if ((epage ==='all')&&(flag == 0)){
butterfly_swiper_injector_config();
}
else if (epage === cpage){
butterfly_swiper_injector_config();
}
</script><script defer src="https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiper.min.js"></script><script defer data-pjax src="https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiper_init.js"></script><!-- hexo injector body_end end --></body></html>