- Spring Cloud云架构 - SSO单点登录之OAuth2.0 根据token获取用户信息(4)
初夏_91fb
上一篇我根据框架中OAuth2.0的使用总结,画了SSO单点登录之OAuth2.0登出流程,今天我们看一下根据用户token获取yoghurt信息的流程:image/***根据token获取用户信息*@paramaccessToken*@return*@throwsException*/@RequestMapping(value="/user/token/{accesstoken}",method
- elementui Cascader 级联选择器的使用总结
XUE_雪
elementui前端javascript
实现效果技术要点总结如下:1、点击添加自动增加多行,实现自主选择增加多条节点数据2、节点地址使用的是Cascader级联选择器,需要动态生成,涉及到一个技术要点是:因v-modal只能获取value不能获取label,故需要解决在多个动态生成的Cascader分别获取他们选中的label和value,下面开始展示相关代码:html:添加删除确定取消js:handleChange(index){va
- 「iOS学习」——Masonry学习
归辞...
ios学习cocoa
iOS学习前言Masonry的属性Masonry的使用基础APIAutoBoxing修饰语倍数中心点设置边距优先级使用总结前言暑假我们学习了使用CocoaPods引入第三方库,实现使用SVG图片。而Masonry作为一个轻量级的布局架构,在使用中可以节省很多时间。故进行简单学习。Masonry的属性UI设计是iOS开发的必须一环,直接影响了app的观感和使用体验。我们通常使用frame框架直接确定
- Python实现BASE64 算法
闲人编程
密码学python算法开发语言BASE64加解密密码学
目录使用Python实现BASE64算法的博客引言BASE64算法的工作原理BASE64编码表Python面向对象实现BASE64算法代码解析应用场景:在文件传输中的使用总结使用Python实现BASE64算法的博客引言在计算机科学中,BASE64是一种常用的数据编码方式,主要用于在处理文本时对二进制数据进行编码。BASE64编码的主要用途是在需要以文本形式传输二进制数据的场景下(例如电子邮件、U
- Flybirds框架使用总结
自动化测试框架
运行环境Python版本:3.9.9Node版本:20.5.1Pycharm版本:2021.3专业版安装flybirds包打开Pycharm终端,输入如下命令:pipinstallflybirds安装完成后继续输入flybirdscreate然后输入项目名、平台,设备名和包名可以后面再填运行用例以Android自动化测试为例在生成的项目路径fbTest/features/test/android新
- echarts使用总结
LeoValiant
echarts堆叠图自适应
1、修改echarts指示线的长度:labelLine:{//指示线长度normal:{length:10}},2、echarts自适应window.addEventListener(‘resize’,function(){myChart.resize();})3、echarts柱形堆叠图注意添加stack属性。series:[{name:‘邮件营销’,type:‘line’,stack:‘总量’
- go语言channle使用总结
xyt001
前言:channel提供了一种通信机制,通过它,一个goroutine可以想另一goroutine发送消息。channel本身还需关联了一个类型,也就是channel可以发送数据的类型。例如:发送int类型消息的channel写作chanint。channel很强大,但是还是有点坑,下面是我个人的总结。1.使用两个值接收channel:<-channel能够返回一个值或者两个值,当返回两个值的时候
- Java 中Lambada表达式中双冒号 ::使用总结
何以解忧,唯有..
java开发语言
一、前言双冒号运算操作符是类方法的句柄,lambda表达式的一种简写表达式:person->person.getName();可以替换成:Person::getName表达式:()->newHashMaplist=Arrays.asList("a","b","c");//静态方法引用ClassName::methodNamelist.forEach(Colon::print);//上一行等价于//
- 单元测试框架PowerMock
yzh_1346983557
Spring测试单元测试PowerMock
目录一、为何用?二、powermock的使用1.引入依赖2.单测代码1.普通public方法2.模拟构造器和final方法3.模拟static静态方法4.局部的final、private方法模拟其它Springboot集成测试:一、为何用?Mockito是一个针对Java的单元测试模拟框架,它与EasyMock和jMock很相似,都是为了简化单元测试过程中测试上下文(或者称之为测试驱动函数以及桩函
- 用powermock编写单元测试
左弦月
单元测试
1、pom文件引入jar包org.springframework.bootspring-boot-starter-testtestjunitjunittestorg.powermockpowermock-module-junit42.0.2testorg.powermockpowermock-api-mockito22.0.2testcom.github.jsonzoujmockdata4.1.2
- 自然语言处理系列四十五》Elasticsearch搜索引擎》Elasticsearch入门及技术原理
陈敬雷-充电了么-CEO兼CTO
搜索引擎自然语言处理elasticsearchaichatgptgpt人工智能
注:此文章内容均节选自充电了么创始人,CEO兼CTO陈敬雷老师的新书《自然语言处理原理与实战》(人工智能科学与技术丛书)【陈敬雷编著】【清华大学出版社】文章目录自然语言处理系列四十五Elasticsearch搜索引擎》Elasticsearch入门及技术原理Elasticsearch安装部署和使用总结自然语言处理系列四十五Elasticsearch搜索引擎》Elasticsearch入门及技术原理
- CPU/内存/综合性能评估工具汇总-1:lmbench
So_shine
linux调试工具和性能量化性能优化
目录一、概括二、lmbench一、概括嵌入式开发中对要设计的产品、立项的项目进行设计时,往往需要对关键芯片进行性能评估,本文主要总结基于linux系统的产品在性能评估时的工具使用总结,在aarch64(arm64平台下测试),板卡根文件系统为debian系统。工具列表如下:名称作用git源码链接lmbench带宽测评,反应时间测评https://github.com/redrose2100/lmb
- 【嵌入式模块】步进电机使用总结
记录无知岁月
#嵌入式设备嵌入式硬件步进电机
关于本博客 此前上了一门课《自动控制元件》,但是由于学时有限,讲到步进电机就不讲了,留下了一个小遗憾,导致需要使用步进电机时就有点懵,于是找了一篇博客,链接在这里,推荐具有电机知识(如直流电机,异步电机等)的朋友看,如果完全不懂,建议先啃书。
- JVM级缓存本地缓存Caffeine
旺仔爱Java
JVM专题jvmJVM缓存本地缓存CaffeineGuavaCache
JVM级缓存本地缓存Caffeine和GuavaCache前言一、创建缓存的代码逻辑二、Caffeine的优化方面淘汰算法W-TinyLFU三、Caffeine的业务使用总结前言最新的Java面试题,技术栈涉及Java基础、集合、多线程、Mysql、分布式、Spring全家桶、MyBatis、Dubbo、缓存、消息队列、Linux…等等,会持续更新。一、创建缓存的代码逻辑Caffeine:publ
- 整合spring cloud云架构 - SSO单点登录之OAuth2.0 根据token获取用户信息(4)
初夏_91fb
上一篇我根据框架中OAuth2.0的使用总结,画了SSO单点登录之OAuth2.0登出流程,今天我们看一下根据用户token获取yoghurt信息的流程:image/***根据token获取用户信息*@paramaccessToken*@return*@throwsException*/@RequestMapping(value="/user/token/{accesstoken}",method
- git命令使用
雄柱
git命令使用总结本文档分为两部分:1、git命令的使用,本地git仓库管理。2、git服务端搭建和使用。初始状态:设置用户名和邮箱:gitconfig--giobaluser.name"用户名"gitconfig--giobaluser.email"邮箱"一、git命令的使用,本地git仓库管理:git基本命令:gitinit创建版本库(repository)手动创建一个目录,进入该目录下执行该
- Alert 组件使用总结
爱绑架的猫
安装局部注册test.vueimport{Alert}from'vux'exportdefault{components:{Alert}}直接看属性:Alert-属性.png这里主要使用value这个属性控制Alert消息弹出框的显示与否,然后使用title控制标题,Content控制提示内容,button-text控制按钮的文字,其他属性暂时没有用到,一般的情况下默认就可以了。事件:Alert-
- curl编译linux静态库及使用总结
搬砖的小青年儿
一、安装OPENSSH1、上传文件并解压openssl-1.0.2k.tar.gz2、执行./configno-asmmakemakeinstall备注:如果要编译动态库,需要增加参数如下:./configno-asm--shared3、生成的文件目录在:/usr/local/ssl下二、安装curl1、上传文件并解压curl-7.53.1.tar.gz2、执行CPPFLAGS="-I/usr/l
- C语言第二十六弹---字符串函数(下)
小林熬夜学编程
C语言详解c语言开发语言算法
✨个人主页:熬夜学编程的小林系列专栏:【C语言详解】【数据结构详解】目录1、strncat函数的使用2、strncmp函数的使用3、strstr函数的使用和模拟实现4、strtok函数的使用5、strerror函数的使用6、perror函数的使用总结1、strncat函数的使用char*strncat(char*destination,constchar*source,size_tnum);•Ap
- C语言第二十五弹---字符函数和字符串函数(上)
小林熬夜学编程
C语言详解c语言开发语言算法
✨个人主页:熬夜学编程的小林系列专栏:【C语言详解】【数据结构详解】目录1、字符分类函数2、字符转换函数3、strlen的使用和模拟实现4、strcpy的模拟实现5、strcat的模拟实现6、strcmp的模拟实现7、strncpy函数的使用总结在编程的过程中,我们经常要处理字符和字符串,为了方便操作字符和字符串,C语言标准库中提供了⼀系列库函数,接下来我们就学习⼀下这些函数。1、字符分类函数C语
- C语言第二十七弹---内存函数
小林熬夜学编程
C语言详解c语言开发语言
✨个人主页:熬夜学编程的小林系列专栏:【C语言详解】【数据结构详解】内存函数1、memcpy使用和模拟实现2、memmove使用和模拟实现3、memset函数的使用4、memcmp函数的使用总结前面两弹讲解了字符函数和字符串函数,但是在我们实际运用中不仅仅只有这些函数,因此下面我们继续需要几个常见的内存函数。1、memcpy使用和模拟实现void*memcpy(void*destination,c
- 【记录】Vue 高德地图使用总结(全地图/点聚合、单独区域、行政区划分、自定义图层)
vue.js高德地图
全地区展示/点聚合单独区域展示行政区划分自定义图层样图展示一、全地区展示/点聚合注意点:1、把AMap.Map绑定dom放到search行政查询之外;2、使用AMap.MarkerClusterer插件点聚合3、不用再把点位map.add/*加载地图*/asyncgetMaps(){this.loading=true;awaitMapLoader().then((AMap)=>{constmap=
- C语言指针进阶
空杯心!
c语言算法c++
常见的几种类型的指针前言一、字符指针(char*)1.字符常量2.字符串常量二、指针数组三、数组指针1.数组指针的定义2.数组名vs&数组名3.数组指针的使用总结前言提示:这里可以添加本文要记录的大概内容:例如:随着人工智能的不断发展,机器学习这门技术也越来越重要,很多人都开启了学习机器学习,本文就介绍了机器学习的基础内容。提示:以下是本篇文章正文内容,下面案例可供参考一、字符指针(char*)指
- React中Dva状态管理(model)的使用总结和理解
小流至江河
ReactDvaUmiJSReact状态管理
一概述React中全局状态管理官方推荐使用Redux,Redux的使用场景其实在单个应用中是处于使用率只有20%,却有80%的学习成本。可是说是React全家桶中最难理解的部分了,相信很多人学习它时,各个概念整很迷糊。我就是要放弃Redux的时候,了解React-redux和redux-saga,它们是对redux的简化处理工具。可他们配置和文件结构,依然麻烦。直到Dva(低洼)的出现将React
- PowerMock简介
SeanPenn
Java单元测试框架主要有JUnit和TestNG,常用的Mock框架主要有EasyMock、Mockito和JMock等,那么为什么还要有PowerMock呢?实际上,PowerMock并不是发明了一套新的Mock框架,而是在原有的几种框架基础上进行扩充,补充完成原有框架所不能完成的工作,从PowerMock的ReadMe文档中可以看出这点:PowerMockisaframeworkthat
- C++STL总结笔记(一)—— 容器和容器适配器
人狮子
C++c++容器数据结构
文章目录前言一、概念1.1顺序容器1.2容器适配器1.3关联容器二、程序示例1.vector和Set自定义数据类型的访问2.vector容器嵌套3.list容器排序4.pair对组的使用总结前言STL是C++中的基于数据结构和算法的标准模板库,可以大量节约系统开发时间,增加程序复用性。STL的六大件包括容器、算法、迭代器、仿函数、适配器和空间配置器,其中几乎所有代码均使用了模板类和模板函数的概念。
- Jest框架使用总结
海的那一边
先俗气一下,Firstofall,什么是Jest?Jest是由Facebook发布的开源的、基于Jasmine的JavaScript单元测试框架。1.jest安装:https://www.jianshu.com/p/16c604d1e0c42.测试执行前的准备及测试执行后的清理(setupandteardown):afterAll(fn):在此文件中的所有测试都完成后,运行的功能。通常用在你想要清
- 基于Spring Boot和Junit4的单元测试进阶教程
文景大大
一、教程目标学会基于AssertJ的断言技术;学会基于AssertJ-DB的数据库断言技术;学会基于JMockit的mock技术;学会内存和数据库的造数;学会集成Maven进行单元测试、集成测试的执行;学会查看测试覆盖率;二、断言技术断言库包含很多,比如junit自带的、hamcrest等,这里推荐使用AssertJ,看它的官网就知道了,宣称fluentassertionsjavalibrary。
- 关于拖拽插件murri.js的使用总结——iframe拖拽卡顿问题
我有一个橙
做一个教务系统的界面,需要用到拖拽功能,要求可以拖拽到任意位置,支持自适应用户体验度高等在网上找了很多类似插件,对比后决定使用murri.js这款插件没有中文文档,github上有英文介绍和丰富的案例,所以做起来还是比较顺手的首先放一个已完成的界面:首页murri的案例中展示了很多种类的拖拽,大家可以根据自己的需要选择使用我这里使用的是比较基础的拖拽,没有排序功能等但是中间遇到一个问题:每个拖拽的
- pandas数据分割pd.cut使用总结
数据分析成长记
用途pandas.cut用来把一组数据分割成离散的区间。比如有一组年龄数据,可以使用pandas.cut将年龄数据分割成不同的年龄段并打上标签。原型参数含义x:被切分的类数组(array-like)数据,必须是1维的(不能用DataFrame);bins:bins是被切割后的区间(或者叫“桶”、“箱”、“面元”),有3中形式:一个int型的标量、标量序列(数组)或者pandas.IntervalI
- Linux的Initrd机制
被触发
linux
Linux 的 initrd 技术是一个非常普遍使用的机制,linux2.6 内核的 initrd 的文件格式由原来的文件系统镜像文件转变成了 cpio 格式,变化不仅反映在文件格式上, linux 内核对这两种格式的 initrd 的处理有着截然的不同。本文首先介绍了什么是 initrd 技术,然后分别介绍了 Linux2.4 内核和 2.6 内核的 initrd 的处理流程。最后通过对 Lin
- maven本地仓库路径修改
bitcarter
maven
默认maven本地仓库路径:C:\Users\Administrator\.m2
修改maven本地仓库路径方法:
1.打开E:\maven\apache-maven-2.2.1\conf\settings.xml
2.找到
 
- XSD和XML中的命名空间
darrenzhu
xmlxsdschemanamespace命名空间
http://www.360doc.com/content/12/0418/10/9437165_204585479.shtml
http://blog.csdn.net/wanghuan203/article/details/9203621
http://blog.csdn.net/wanghuan203/article/details/9204337
http://www.cn
- Java 求素数运算
周凡杨
java算法素数
网络上对求素数之解数不胜数,我在此总结归纳一下,同时对一些编码,加以改进,效率有成倍热提高。
第一种:
原理: 6N(+-)1法 任何一个自然数,总可以表示成为如下的形式之一: 6N,6N+1,6N+2,6N+3,6N+4,6N+5 (N=0,1,2,…)
- java 单例模式
g21121
java
想必单例模式大家都不会陌生,有如下两种方式来实现单例模式:
class Singleton {
private static Singleton instance=new Singleton();
private Singleton(){}
static Singleton getInstance() {
return instance;
}
- Linux下Mysql源码安装
510888780
mysql
1.假设已经有mysql-5.6.23-linux-glibc2.5-x86_64.tar.gz
(1)创建mysql的安装目录及数据库存放目录
解压缩下载的源码包,目录结构,特殊指定的目录除外:
- 32位和64位操作系统
墙头上一根草
32位和64位操作系统
32位和64位操作系统是指:CPU一次处理数据的能力是32位还是64位。现在市场上的CPU一般都是64位的,但是这些CPU并不是真正意义上的64 位CPU,里面依然保留了大部分32位的技术,只是进行了部分64位的改进。32位和64位的区别还涉及了内存的寻址方面,32位系统的最大寻址空间是2 的32次方= 4294967296(bit)= 4(GB)左右,而64位系统的最大寻址空间的寻址空间则达到了
- 我的spring学习笔记10-轻量级_Spring框架
aijuans
Spring 3
一、问题提问:
→ 请简单介绍一下什么是轻量级?
轻量级(Leightweight)是相对于一些重量级的容器来说的,比如Spring的核心是一个轻量级的容器,Spring的核心包在文件容量上只有不到1M大小,使用Spring核心包所需要的资源也是很少的,您甚至可以在小型设备中使用Spring。
 
- mongodb 环境搭建及简单CURD
antlove
WebInstallcurdNoSQLmongo
一 搭建mongodb环境
1. 在mongo官网下载mongodb
2. 在本地创建目录 "D:\Program Files\mongodb-win32-i386-2.6.4\data\db"
3. 运行mongodb服务 [mongod.exe --dbpath "D:\Program Files\mongodb-win32-i386-2.6.4\data\
- 数据字典和动态视图
百合不是茶
oracle数据字典动态视图系统和对象权限
数据字典(data dictionary)是 Oracle 数据库的一个重要组成部分,这是一组用于记录数据库信息的只读(read-only)表。随着数据库的启动而启动,数据库关闭时数据字典也关闭 数据字典中包含
数据库中所有方案对象(schema object)的定义(包括表,视图,索引,簇,同义词,序列,过程,函数,包,触发器等等)
数据库为一
- 多线程编程一般规则
bijian1013
javathread多线程java多线程
如果两个工两个以上的线程都修改一个对象,那么把执行修改的方法定义为被同步的,如果对象更新影响到只读方法,那么只读方法也要定义成同步的。
不要滥用同步。如果在一个对象内的不同的方法访问的不是同一个数据,就不要将方法设置为synchronized的。
- 将文件或目录拷贝到另一个Linux系统的命令scp
bijian1013
linuxunixscp
一.功能说明 scp就是security copy,用于将文件或者目录从一个Linux系统拷贝到另一个Linux系统下。scp传输数据用的是SSH协议,保证了数据传输的安全,其格式如下: scp 远程用户名@IP地址:文件的绝对路径
- 【持久化框架MyBatis3五】MyBatis3一对多关联查询
bit1129
Mybatis3
以教员和课程为例介绍一对多关联关系,在这里认为一个教员可以叫多门课程,而一门课程只有1个教员教,这种关系在实际中不太常见,通过教员和课程是多对多的关系。
示例数据:
地址表:
CREATE TABLE ADDRESSES
(
ADDR_ID INT(11) NOT NULL AUTO_INCREMENT,
STREET VAR
- cookie状态判断引发的查找问题
bitcarter
formcgi
先说一下我们的业务背景:
1.前台将图片和文本通过form表单提交到后台,图片我们都做了base64的编码,并且前台图片进行了压缩
2.form中action是一个cgi服务
3.后台cgi服务同时供PC,H5,APP
4.后台cgi中调用公共的cookie状态判断方法(公共的,大家都用,几年了没有问题)
问题:(折腾两天。。。。)
1.PC端cgi服务正常调用,cookie判断没
- 通过Nginx,Tomcat访问日志(access log)记录请求耗时
ronin47
一、Nginx通过$upstream_response_time $request_time统计请求和后台服务响应时间
nginx.conf使用配置方式:
log_format main '$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent "$http_r
- java-67- n个骰子的点数。 把n个骰子扔在地上,所有骰子朝上一面的点数之和为S。输入n,打印出S的所有可能的值出现的概率。
bylijinnan
java
public class ProbabilityOfDice {
/**
* Q67 n个骰子的点数
* 把n个骰子扔在地上,所有骰子朝上一面的点数之和为S。输入n,打印出S的所有可能的值出现的概率。
* 在以下求解过程中,我们把骰子看作是有序的。
* 例如当n=2时,我们认为(1,2)和(2,1)是两种不同的情况
*/
private stati
- 看别人的博客,觉得心情很好
Cb123456
博客心情
以为写博客,就是总结,就和日记一样吧,同时也在督促自己。今天看了好长时间博客:
职业规划:
http://www.iteye.com/blogs/subjects/zhiyeguihua
android学习:
1.http://byandby.i
- [JWFD开源工作流]尝试用原生代码引擎实现循环反馈拓扑分析
comsci
工作流
我们已经不满足于仅仅跳跃一次,通过对引擎的升级,今天我测试了一下循环反馈模式,大概跑了200圈,引擎报一个溢出错误
在一个流程图的结束节点中嵌入一段方程,每次引擎运行到这个节点的时候,通过实时编译器GM模块,计算这个方程,计算结果与预设值进行比较,符合条件则跳跃到开始节点,继续新一轮拓扑分析,直到遇到
- JS常用的事件及方法
cwqcwqmax9
js
事件 描述
onactivate 当对象设置为活动元素时触发。
onafterupdate 当成功更新数据源对象中的关联对象后在数据绑定对象上触发。
onbeforeactivate 对象要被设置为当前元素前立即触发。
onbeforecut 当选中区从文档中删除之前在源对象触发。
onbeforedeactivate 在 activeElement 从当前对象变为父文档其它对象之前立即
- 正则表达式验证日期格式
dashuaifu
正则表达式IT其它java其它
正则表达式验证日期格式
function isDate(d){
var v = d.match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/i);
if(!v) {
this.focus();
return false;
}
}
<input value="2000-8-8" onblu
- Yii CModel.rules() 方法 、validate预定义完整列表、以及说说验证
dcj3sjt126com
yii
public array rules () {return} array 要调用 validate() 时应用的有效性规则。 返回属性的有效性规则。声明验证规则,应重写此方法。 每个规则是数组具有以下结构:array('attribute list', 'validator name', 'on'=>'scenario name', ...validation
- UITextAttributeTextColor = deprecated in iOS 7.0
dcj3sjt126com
ios
In this lesson we used the key "UITextAttributeTextColor" to change the color of the UINavigationBar appearance to white. This prompts a warning "first deprecated in iOS 7.0."
Ins
- 判断一个数是质数的几种方法
EmmaZhao
Mathpython
质数也叫素数,是只能被1和它本身整除的正整数,最小的质数是2,目前发现的最大的质数是p=2^57885161-1【注1】。
判断一个数是质数的最简单的方法如下:
def isPrime1(n):
for i in range(2, n):
if n % i == 0:
return False
return True
但是在上面的方法中有一些冗余的计算,所以
- SpringSecurity工作原理小解读
坏我一锅粥
SpringSecurity
SecurityContextPersistenceFilter
ConcurrentSessionFilter
WebAsyncManagerIntegrationFilter
HeaderWriterFilter
CsrfFilter
LogoutFilter
Use
- JS实现自适应宽度的Tag切换
ini
JavaScripthtmlWebcsshtml5
效果体验:http://hovertree.com/texiao/js/3.htm
该效果使用纯JavaScript代码,实现TAB页切换效果,TAB标签根据内容自适应宽度,点击TAB标签切换内容页。
HTML文件代码:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
- Hbase Rest API : 数据查询
kane_xie
RESThbase
hbase(hadoop)是用java编写的,有些语言(例如python)能够对它提供良好的支持,但也有很多语言使用起来并不是那么方便,比如c#只能通过thrift访问。Rest就能很好的解决这个问题。Hbase的org.apache.hadoop.hbase.rest包提供了rest接口,它内嵌了jetty作为servlet容器。
启动命令:./bin/hbase rest s
- JQuery实现鼠标拖动元素移动位置(源码+注释)
明子健
jqueryjs源码拖动鼠标
欢迎讨论指正!
print.html代码:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv=Content-Type content="text/html;charset=utf-8">
<title>发票打印</title>
&l
- Postgresql 连表更新字段语法 update
qifeifei
PostgreSQL
下面这段sql本来目的是想更新条件下的数据,可是这段sql却更新了整个表的数据。sql如下:
UPDATE tops_visa.visa_order
SET op_audit_abort_pass_date = now()
FROM
tops_visa.visa_order as t1
INNER JOIN tops_visa.visa_visitor as t2
ON t1.
- 将redis,memcache结合使用的方案?
tcrct
rediscache
公司架构上使用了阿里云的服务,由于阿里的kvstore收费相当高,打算自建,自建后就需要自己维护,所以就有了一个想法,针对kvstore(redis)及ocs(memcache)的特点,想自己开发一个cache层,将需要用到list,set,map等redis方法的继续使用redis来完成,将整条记录放在memcache下,即findbyid,save等时就memcache,其它就对应使用redi
- 开发中遇到的诡异的bug
wudixiaotie
bug
今天我们服务器组遇到个问题:
我们的服务是从Kafka里面取出数据,然后把offset存储到ssdb中,每个topic和partition都对应ssdb中不同的key,服务启动之后,每次kafka数据更新我们这边收到消息,然后存储之后就发现ssdb的值偶尔是-2,这就奇怪了,最开始我们是在代码中打印存储的日志,发现没什么问题,后来去查看ssdb的日志,才发现里面每次set的时候都会对同一个key