- ExpRe[25] bash外的其它shell:zsh和fish
tritone
ExpRebashlinuxubuntushell
文章目录zsh基础配置实用特性插件`autojump`语法高亮自动补全fish优点缺点时效性本篇撰写时间为2021.12.15,由于计算机技术日新月异,博客中所有内容都有时效和版本限制,具体做法不一定总行得通,链接可能改动失效,各种软件的用法可能有修改。但是其中透露的思想往往是值得学习的。本篇前置:ExpRe[10]Ubuntu[2]准备神秘软件、备份恢复软件https://www.cnblogs
- 2021.12.22
064ba3be82cb
会籍部姓名:【高亮】日期:12月22日当月任务:5.5w当日预约业绩:0当日轮排业绩:0当日新购卡量:0当日续费卡量:当月已完成总业绩:4712当月新购总数:2当月续费总数:当月总单量:2今日使用代金劵:0月使用代金劵:0次日预约量:0今天晚班,下午打了打过期的老会员,有点小收获,加了几个微信,月底了争取突破一下,有个好业绩
- 高效率的开发工具
罗_三金
vscode
哪个编程工具让你的工作效率翻倍?vscode工具介绍智能代码编辑:语法高亮:支持多种编程语言的语法高亮。代码补全:提供智能代码补全和提示,减少打字量。代码片段:支持代码片段和模板,帮助快速编写常用代码。调试功能:集成调试器:支持多种语言的调试,提供断点、变量监视、调用堆栈等功能。调试配置:允许用户自定义调试配置,以适应不同的开发需求。版本控制:Git集成:内置Git支持,可以直接从编辑器进行版本控
- 蓝光已成为皮肤的隐形杀手!
果然小魔女
长时间任性玩手机,任性后的代价就是....皮肤好干!好粗糙!还长皱纹!看起来老了好几岁,我内心是崩溃的!电子屏的蓝光入侵,你的肌肤正在经历一场“刀光剑影”!图片发自App一、导致色素沉着有害蓝光对皮肤的穿透力比紫外线强。据科学实验证明:连续使用3个小时高亮度屏幕相当于暴晒太阳1小时,所以皮肤会干燥缺水;二、导致皮肤老化据医学研究发现:有害蓝光是皮肤衰老的又一大罪魁祸首,因为它可以穿透皮肤的表皮和真
- notepad++软件介绍(含安装包)
LQS2020
notepad++
Notepad++是一款开源的文本编辑器,主要用于编程和代码编辑。它是一个功能强大的替代品,常常被用来替代Windows系统自带的记事本。Notepad++win系统免费下载地址以下是Notepad++的一些主要特点和功能:多语言支持:Notepad++支持多种编程语言,包括Python、JavaScript、HTML、CSS、C++、Java等。它能够根据文件类型自动高亮显示语法,使代码更加易读
- 一款可以替代Notepad++的免费高级文本编辑器
ITdgr
notepad++
Kate文本编辑器是一款跨平台的免费高级文本编辑器,具有丰富的功能和特性。它支持标签页、代码高亮、多文件查找、垂直/水平视图、侧边栏、颜色主题等特性,类似于Notepad++。它以其多功能性和易用性广受好评。Kate支持多文档界面(MDI)和标签页,允许用户同时编辑和查看多个文件,无论是单独在一个窗口中还是在分割视图中。相较于其他文本编辑器,Kate提供了更为全面的功能和更好的跨平台支持。它的多文
- vue 搜索关键字,关键字标红
Feng、锋
vuejsjavascriptvue.jshtml
vue使用v-htmlthis.voice_result.map(e=>{if(this.red_text){//匹配关键字正则letreplaceReg=newRegExp(this.red_text,'g');//高亮替换v-html值letreplaceString=''+this.red_text+'';//开始替换e.info=e.info.replace(replaceReg,repl
- Qt Creator
morcake
qt开发语言
QtCreator是一个跨平台的C++、JavaScript和QML集成开发环境,它简化了GUI应用的开发。支持用户在Linux、Mac以及Windows系统上使用,它是QtGUI应用开发框架的SDK的一部分。该编辑器具有语法高亮和自动补全等功能。Qt(/ˈkjuːt/,发音同“cute”[4][5][6])是一个跨平台的C++应用程序开发框架。广泛用于开发GUI程序,这种情况下又被称为部件工具箱
- 全国计算机四级——操作系统原理笔记
zhZeng
全国计算机等级考试系统架构
学习建议:结合书和笔记把知识过一遍—>买题库刷试卷—>始终学不明白的题目去刷章节题目—>背新增试卷题目关于本笔记:写者参加2022年5月的考试,参考《全国计算机等级考试四级教程操作系统原理(2021年版)》和网上的一些资源,在看书的过程中写下本笔记,基于markdown。笔记中黄色高亮的都是试卷中出现过的或者比较重要的概念,可以重点记忆一下。读者可以通过浏览本笔记,了解操作系统原理大致内容以及重点
- Element-ui设置table 选中某行高亮自定义背景色
iOS_MingXing
uielementui
Element-ui设置table选中某行高亮自定义背景色在el-table标签中添加单选highlight-current-row在style中设置颜色/*设置当前页面element全局table选中某行时的背景色*/.el-table__bodytr.current-row>td{background-color:#69A8EA!important;color:#fff;}
- linux修改文件内容
谁点的猪脚饭
linuxlinux
进入文件(1)vi文件名,进入文件vi.env查找要修改的内容(1)输入shift+“:”,变成可输入指令状态:(2)输入/+查询内容,如我要修改VERSION参数后的内容则输入/VERSION按下回车即会高亮显示此部分:/VERSION编辑内容(1)找到要修改的内容后,按i键即可进入编辑状态(2)编辑完成后,按住Esc退出编辑保存修改(1)保存编辑后的内容,shift+“:”变为指令状态,输入w
- 攻防世界-Web_php_unserialize
roast mouse
php网络安全
攻防世界-Web_php_unserialize分析php代码file=$file;}//析构函数function__destruct(){//打开指定文件,并高亮文件中内容,第二个为return参数,为true,函数将返回高亮显示的代码字符串,而不是直接输出到浏览器。echo@highlight_file($this->file,true);}//wakeup魔法函数,在反序列化之前调用。fun
- Vue Element-UI Table点击某一行,将该行背景色改变 高亮点击的行
水蜜桃那么甜
vue
想要实现一个点击一行,改行的背景色改变,高亮,如下图所示1、先开启element的高亮选项--><el-table-columnprop=
- springboot3 集成elasticsearch(es)客户端(高亮查询)
abments
ESelasticsearchjenkins大数据
集成依赖org.springframework.bootspring-boot-starter-parent3.2.5org.springframework.bootspring-boot-starter-data-elasticsearch配置参数spring:elasticsearch:uris:http://XXXX:9200username:elasticpassword:'XXXX'定义
- 使Emacs支持语法分析器 bison
ManateeLazyCat
前几天写了一个flex.el,今天看了一下bison-mode.el的代码,也太陈旧了,顺手再写一个bison.elbisonmodebison支持bison的标记定义和规则代码区域的语法高亮.安装方法下载bison里面的bison.el放到~/elisp目录把下面的配置加入到~/.emacs中(add-to-list'load-path(expand-file-name"~/elisp"))(r
- ElasticSearch 6.x 学习笔记:19.搜索高亮
程裕强
Elasticsearch6.x学习笔记高亮highlight
19.1高亮概述参照官方文档https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-request-highlighting.htmlHighlightersenableyoutogethighlightedsnippetsfromoneormorefieldsinyoursearchresultssoyoucansho
- linux交互式命令行,Linux命令行下交互式HTTP客户端--HTTP Prompt
湖州太守
linux交互式命令行
HTTPPrompt是一个交互式的命令行HTTP客户端,支持自动完成、语法高亮,基于HTTPie和prompt_toolkit构建。HTTPPrompt相对于其它命令行的HTTP客户端(如HTTPie、Curl等)使用上更加直观方便。如对HTTPie有兴趣,可参考之前写的[如何用httpie更高效的调试接口]一文。先展示一下HTTPPrompt官方给出的效果图。有没有觉得很酷!HTTPPrompt
- 21.Elasticsearch索引基础查询-3
大勇任卷舒
21.1短语搜索精确匹配GET/megacorp/employee/_search{"query":{"match_phrase":{"about":"rockclimbing"}}}21.2高亮搜索GET/megacorp/employee/_search{"query":{"match_phrase":{"about":"rockclimbing"}},"highlight":{"fields
- Converse产品细节
RP
不同于安卓,iOS声音大小调整时没有声音,Converse重做了音量大小的调整显示,放到版边不挡翻译内容之外,加入了音量辅助。无声音状态时,显示翻译结果的同时提示调高音量读音同时,根据读音的进度,显示对应词汇的高亮
- vim 简易配置
raoxu_1154492168
vim前端编辑器
setnocompatiblesetbackspace=2"--------------display-----------------setnu"行号syntaxon"语法高亮setruler"显示当前行和列setshowcmd"显示部分命令setshowmode"最后一行显示当前模式"setmatch"显示括号匹配"--------------display-----------------"
- 程序员:用黑科技码字它不香吗?Windows必装软件!
折扇戏美人_a48e
Windows必装软件,你将掌握▼“分享几款:轻量化易上手,美观编程软件”一.VisualStudioCode(程序员必备写代码工具)1、VisualStudioCode是一款免费开源的微软代码编辑器,支持几乎所有主流的开发语言的语法高亮、括号匹配、代码片段、代码对比Diff、GIT等特性。2、支持插件扩展,并针对网页开发和云端应用开发做了优化。Visualstudiocode下载跨平台支持Win
- elasticsearch中的DSL语句操作
苏汀star
elasticsearchMySQLelasticsearch大数据搜索引擎DSLes操作语句java
文章目录概要创建索引时的关键字段文档操作中的关键字段查询操作中的关键字段分页和排序中的关键字段高亮查询的关键字段聚合操作的关键字段操作语句索引操作:1、创建索引(CreateanIndex)2、查看索引(GetIndexInformation)3、更新索引设置(UpdateIndexSettings)4、删除索引(DeleteanIndex)5、删除索引中的所有数据(DeleteByQuery)6
- 【收藏】Arcgis api4.x 悬停高亮且打开popup弹窗
WebGIS皮卡茂
arcgisapiforjsarcgisjavascript前端框架
1.效果2.思路2.1学习高亮2.1.1图层的"layerView"layerView是用于渲染和显示地图图层的视图,它允许你控制图层的渲染方式,并且可以监听与该图层相关的事件等。view.whenLayerView(currentLayer).then(function(layerView){//layerView是currentLayer图层的LayerView实例//currentLayer
- cesium模型加载-点击-高亮
依托偶尔宁
cesiumjavascript前端
cesium模型加载-点击-高亮模型加载,Cesium3DTileset文档地址vartileset=scene.primitives.add(newCesium.Cesium3DTileset({url:'http://localhost:8002/tilesets/Seattle/tileset.json'}));设置tileset的样式,Cesium3DTileStyle文档地址tilese
- C++零基础自学-第一课 C++的基本语法
Qs2011_
C++零基础自学c++开发语言
前言在当今各种编程语言百花齐放时,C++却是有不少的学习受众,刚入门的新手尤其多。但由于C++语言的复杂性,让不少新手望而却步。我创建的这个专栏也是为了能让新手们更好的学习与理解C++语言,这也是我的第一篇专栏,第一篇文章,希望大家多多支持!正文1.编译器选择“工欲善其事,必先利其器”,想要学好一种编程语言也离不开一个好的编译器。最适合新手的编译器我推荐Dev-C++,简洁好用,包含语法高亮,非常
- 全面启用Markdown语法以及前端格式优化(代码高亮行号显示等优化)全过程
zoomlaCMS
什么是MarkDownMarkdown是一种可以使用普通文本编辑器编写的标记语言,通过简单的标记语法,它可以使普通文本内容具有一定的格式。Markdown具有一系列衍生版本,用于扩展Markdown的功能(如表格、脚注、内嵌HTML等等),这些功能原初的Markdown尚不具备,它们能让Markdown转换成更多的格式,例如LaTeX,Docbook。Markdown增强版中比较有名的有Markd
- 【C#】【EXCEL】BumblebeeComponentsAnalysisGH_Ex_Ana_CondBlank.cs
hmywillstronger
c#excel开发语言
这段代码定义了一个名为GH_Ex_Ana_CondBlank的类,它是一个Grasshopper组件,用于在Excel工作表中为特定范围添加条件格式。具体功能和介绍如下:功能概述:这个组件用于在Excel中为指定的单元格范围添加基于空白值的条件格式。它允许用户高亮显示空白或非空白的单元格。主要特性:可以设置高亮颜色可以选择高亮空白或非空白单元格可以选择清除现有的条件格式可以控制是否激活条件格式输入
- xshell命令行高亮烦扰
StoicD
CentOS开发工具
xshell命令行高亮烦扰问题描述:选中代码之后进行关键字搜索,搜索完之后,关键字是高亮显示解决:再次选中随意数量代码,ctrl+shift+f即可
- 简易Python:xlrd 和 openpyxl 库读取Excel单元格数据几种方式
PythonKaiser
pythonwindowsexcel
xlrd库是比较经典的一个库了,经典到vscode都没有代码提示,也没有高亮显示,堪称古典。xlrd也是很轻量的库,用起来不难。初步了解面向对象编码后,也可以尝试阅读源码学习代码组织方式。以下进入正题。首先当然是下载安装xlrd库了,然后import该库。在链式调用的各个函数中填入相应参数:文件路径和工作表序号(或名称),以上都是读取同一个单元格的数据,可以看出,几种读取方式的代码数量是一样的。而
- vue2/3 - 实现高德地图根据位置经纬度获取天气信息,vue使用高德地图根据当前定位读取天气(温度、风向、风速等),可在地图上进行标记高亮展示天气信息,显示地图和查询天气(详细示例代码,复制即用)
街尾杂货店&
前端组件与功能(开箱即用)vue3vue2高德地图获取天气情况的api查询当前位置的天气数据vue获取定位的天气预报如何使用高德地图天气api接口
效果图在vue2、vue3项目开发中,利用高德地图根据地理位置获取查询天气信息,详细vue高德地图根据经纬度或城市名获取天气数据,并在地图上标记气泡弹框式展示出来。提供详细示例源代码,一键复制稍微改下就能用了!准备开始要完成该功能,首先要
- SQL的各种连接查询
xieke90
UNION ALLUNION外连接内连接JOIN
一、内连接
概念:内连接就是使用比较运算符根据每个表共有的列的值匹配两个表中的行。
内连接(join 或者inner join )
SQL语法:
select * fron
- java编程思想--复用类
百合不是茶
java继承代理组合final类
复用类看着标题都不知道是什么,再加上java编程思想翻译的比价难懂,所以知道现在才看这本软件界的奇书
一:组合语法:就是将对象的引用放到新类中即可
代码:
package com.wj.reuse;
/**
*
* @author Administrator 组
- [开源与生态系统]国产CPU的生态系统
comsci
cpu
计算机要从娃娃抓起...而孩子最喜欢玩游戏....
要让国产CPU在国内市场形成自己的生态系统和产业链,国家和企业就不能够忘记游戏这个非常关键的环节....
投入一些资金和资源,人力和政策,让游
- JVM内存区域划分Eden Space、Survivor Space、Tenured Gen,Perm Gen解释
商人shang
jvm内存
jvm区域总体分两类,heap区和非heap区。heap区又分:Eden Space(伊甸园)、Survivor Space(幸存者区)、Tenured Gen(老年代-养老区)。 非heap区又分:Code Cache(代码缓存区)、Perm Gen(永久代)、Jvm Stack(java虚拟机栈)、Local Method Statck(本地方法栈)。
HotSpot虚拟机GC算法采用分代收
- 页面上调用 QQ
oloz
qq
<A href="tencent://message/?uin=707321921&Site=有事Q我&Menu=yes">
<img style="border:0px;" src=http://wpa.qq.com/pa?p=1:707321921:1></a>
- 一些问题
文强chu
问题
1.eclipse 导出 doc 出现“The Javadoc command does not exist.” javadoc command 选择 jdk/bin/javadoc.exe 2.tomcate 配置 web 项目 .....
SQL:3.mysql * 必须得放前面 否则 select&nbs
- 生活没有安全感
小桔子
生活孤独安全感
圈子好小,身边朋友没几个,交心的更是少之又少。在深圳,除了男朋友,没几个亲密的人。不知不觉男朋友成了唯一的依靠,毫不夸张的说,业余生活的全部。现在感情好,也很幸福的。但是说不准难免人心会变嘛,不发生什么大家都乐融融,发生什么很难处理。我想说如果不幸被分手(无论原因如何),生活难免变化很大,在深圳,我没交心的朋友。明
- php 基础语法
aichenglong
php 基本语法
1 .1 php变量必须以$开头
<?php
$a=” b”;
echo
?>
1 .2 php基本数据库类型 Integer float/double Boolean string
1 .3 复合数据类型 数组array和对象 object
1 .4 特殊数据类型 null 资源类型(resource) $co
- mybatis tools 配置详解
AILIKES
mybatis
MyBatis Generator中文文档
MyBatis Generator中文文档地址:
http://generator.sturgeon.mopaas.com/
该中文文档由于尽可能和原文内容一致,所以有些地方如果不熟悉,看中文版的文档的也会有一定的障碍,所以本章根据该中文文档以及实际应用,使用通俗的语言来讲解详细的配置。
本文使用Markdown进行编辑,但是博客显示效
- 继承与多态的探讨
百合不是茶
JAVA面向对象 继承 对象
继承 extends 多态
继承是面向对象最经常使用的特征之一:继承语法是通过继承发、基类的域和方法 //继承就是从现有的类中生成一个新的类,这个新类拥有现有类的所有extends是使用继承的关键字:
在A类中定义属性和方法;
class A{
//定义属性
int age;
//定义方法
public void go
- JS的undefined与null的实例
bijian1013
JavaScriptJavaScript
<form name="theform" id="theform">
</form>
<script language="javascript">
var a
alert(typeof(b)); //这里提示undefined
if(theform.datas
- TDD实践(一)
bijian1013
java敏捷TDD
一.TDD概述
TDD:测试驱动开发,它的基本思想就是在开发功能代码之前,先编写测试代码。也就是说在明确要开发某个功能后,首先思考如何对这个功能进行测试,并完成测试代码的编写,然后编写相关的代码满足这些测试用例。然后循环进行添加其他功能,直到完全部功能的开发。
- [Maven学习笔记十]Maven Profile与资源文件过滤器
bit1129
maven
什么是Maven Profile
Maven Profile的含义是针对编译打包环境和编译打包目的配置定制,可以在不同的环境上选择相应的配置,例如DB信息,可以根据是为开发环境编译打包,还是为生产环境编译打包,动态的选择正确的DB配置信息
Profile的激活机制
1.Profile可以手工激活,比如在Intellij Idea的Maven Project视图中可以选择一个P
- 【Hive八】Hive用户自定义生成表函数(UDTF)
bit1129
hive
1. 什么是UDTF
UDTF,是User Defined Table-Generating Functions,一眼看上去,貌似是用户自定义生成表函数,这个生成表不应该理解为生成了一个HQL Table, 貌似更应该理解为生成了类似关系表的二维行数据集
2. 如何实现UDTF
继承org.apache.hadoop.hive.ql.udf.generic
- tfs restful api 加auth 2.0认计
ronin47
目前思考如何给tfs的ngx-tfs api增加安全性。有如下两点:
一是基于客户端的ip设置。这个比较容易实现。
二是基于OAuth2.0认证,这个需要lua,实现起来相对于一来说,有些难度。
现在重点介绍第二种方法实现思路。
前言:我们使用Nginx的Lua中间件建立了OAuth2认证和授权层。如果你也有此打算,阅读下面的文档,实现自动化并获得收益。SeatGe
- jdk环境变量配置
byalias
javajdk
进行java开发,首先要安装jdk,安装了jdk后还要进行环境变量配置:
1、下载jdk(http://java.sun.com/javase/downloads/index.jsp),我下载的版本是:jdk-7u79-windows-x64.exe
2、安装jdk-7u79-windows-x64.exe
3、配置环境变量:右击"计算机"-->&quo
- 《代码大全》表驱动法-Table Driven Approach-2
bylijinnan
java
package com.ljn.base;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.uti
- SQL 数值四舍五入 小数点后保留2位
chicony
四舍五入
1.round() 函数是四舍五入用,第一个参数是我们要被操作的数据,第二个参数是设置我们四舍五入之后小数点后显示几位。
2.numeric 函数的2个参数,第一个表示数据长度,第二个参数表示小数点后位数。
例如:
select cast(round(12.5,2) as numeric(5,2))  
- c++运算符重载
CrazyMizzz
C++
一、加+,减-,乘*,除/ 的运算符重载
Rational operator*(const Rational &x) const{
return Rational(x.a * this->a);
}
在这里只写乘法的,加减除的写法类似
二、<<输出,>>输入的运算符重载
&nb
- hive DDL语法汇总
daizj
hive修改列DDL修改表
hive DDL语法汇总
1、对表重命名
hive> ALTER TABLE table_name RENAME TO new_table_name;
2、修改表备注
hive> ALTER TABLE table_name SET TBLPROPERTIES ('comment' = new_comm
- jbox使用说明
dcj3sjt126com
Web
参考网址:http://www.kudystudio.com/jbox/jbox-demo.html jBox v2.3 beta [
点击下载]
技术交流QQGroup:172543951 100521167
[2011-11-11] jBox v2.3 正式版
- [调整&修复] IE6下有iframe或页面有active、applet控件
- UISegmentedControl 开发笔记
dcj3sjt126com
// typedef NS_ENUM(NSInteger, UISegmentedControlStyle) {
// UISegmentedControlStylePlain, // large plain
&
- Slick生成表映射文件
ekian
scala
Scala添加SLICK进行数据库操作,需在sbt文件上添加slick-codegen包
"com.typesafe.slick" %% "slick-codegen" % slickVersion
因为我是连接SQL Server数据库,还需添加slick-extensions,jtds包
"com.typesa
- ES-TEST
gengzg
test
package com.MarkNum;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.annotation
- 为何外键不再推荐使用
hugh.wang
mysqlDB
表的关联,是一种逻辑关系,并不需要进行物理上的“硬关联”,而且你所期望的关联,其实只是其数据上存在一定的联系而已,而这种联系实际上是在设计之初就定义好的固有逻辑。
在业务代码中实现的时候,只要按照设计之初的这种固有关联逻辑来处理数据即可,并不需要在数据库层面进行“硬关联”,因为在数据库层面通过使用外键的方式进行“硬关联”,会带来很多额外的资源消耗来进行一致性和完整性校验,即使很多时候我们并不
- 领域驱动设计
julyflame
VODAO设计模式DTOpo
概念:
VO(View Object):视图对象,用于展示层,它的作用是把某个指定页面(或组件)的所有数据封装起来。
DTO(Data Transfer Object):数据传输对象,这个概念来源于J2EE的设计模式,原来的目的是为了EJB的分布式应用提供粗粒度的数据实体,以减少分布式调用的次数,从而提高分布式调用的性能和降低网络负载,但在这里,我泛指用于展示层与服务层之间的数据传输对
- 单例设计模式
hm4123660
javaSingleton单例设计模式懒汉式饿汉式
单例模式是一种常用的软件设计模式。在它的核心结构中只包含一个被称为单例类的特殊类。通过单例模式可以保证系统中一个类只有一个实例而且该实例易于外界访问,从而方便对实例个数的控制并节约系统源。如果希望在系统中某个类的对象只能存在一个,单例模式是最好的解决方案。
&nb
- logback
zhb8015
loglogback
一、logback的介绍
Logback是由log4j创始人设计的又一个开源日志组件。logback当前分成三个模块:logback-core,logback- classic和logback-access。logback-core是其它两个模块的基础模块。logback-classic是log4j的一个 改良版本。此外logback-class
- 整合Kafka到Spark Streaming——代码示例和挑战
Stark_Summer
sparkstormzookeeperPARALLELISMprocessing
作者Michael G. Noll是瑞士的一位工程师和研究员,效力于Verisign,是Verisign实验室的大规模数据分析基础设施(基础Hadoop)的技术主管。本文,Michael详细的演示了如何将Kafka整合到Spark Streaming中。 期间, Michael还提到了将Kafka整合到 Spark Streaming中的一些现状,非常值得阅读,虽然有一些信息在Spark 1.2版
- spring-master-slave-commondao
王新春
DAOspringdataSourceslavemaster
互联网的web项目,都有个特点:请求的并发量高,其中请求最耗时的db操作,又是系统优化的重中之重。
为此,往往搭建 db的 一主多从库的 数据库架构。作为web的DAO层,要保证针对主库进行写操作,对多个从库进行读操作。当然在一些请求中,为了避免主从复制的延迟导致的数据不一致性,部分的读操作也要到主库上。(这种需求一般通过业务垂直分开,比如下单业务的代码所部署的机器,读去应该也要从主库读取数