<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[xiaocaodeshengri的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/xiaocaodeshengri</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; xiaocaodeshengri]]></copyright><item><title><![CDATA[使用K8s heml部署redis高可用架构]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/117918565</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/117918565</guid><author>xiaocaodeshengri</author><pubDate>Tue, 15 Jun 2021 17:20:12 +0800</pubDate><description><![CDATA[1、安装helm
1、下载  helm

2、第二步，解压helm压缩文件，把解压后的helm目录复制到 usr/bin 目录中

3、使用命令：helm

2、配置helm仓库
###### 配置微软源
helm repo add stable http://mirror.azure.cn/kubernetes/charts
###### 配置阿里源
helm repo add aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
##]]></description><category></category></item><item><title><![CDATA[UT Case]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/116978869</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/116978869</guid><author>xiaocaodeshengri</author><pubDate>Tue, 18 May 2021 11:58:34 +0800</pubDate><description><![CDATA[Mock
public class UtCaseController   {

    private MockMvc mvc;

    @InjectMocks
    private DeclarationController declarationController;

    @Mock
    private DeclarationService declarationService;

    @Mock
    private ConfirmationPdfService confirma]]></description><category></category></item><item><title><![CDATA[commond]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/116654358</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/116654358</guid><author>xiaocaodeshengri</author><pubDate>Tue, 11 May 2021 17:00:37 +0800</pubDate><description><![CDATA[命令
打包命令
mvn clean package -Dmaven.test.skip=true -Dspring.profiles.active=dev -Pdev
mvn package -Dmaven.test.skip=true -pl module  ( 这个使用于module的项目 )

重新编译pom文件
mvn idea:module

pgsqlServer的启动
pg_ctl.exe start -D ./data

重新引入jar包强制引入
mvn clean install -U -]]></description><category></category></item><item><title><![CDATA[Redis 缓存设计]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/109279472</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/109279472</guid><author>xiaocaodeshengri</author><pubDate>Sun, 25 Oct 2020 21:44:06 +0800</pubDate><description><![CDATA[Redis 缓存设计
缓存设计
缓存穿透
缓存穿透是指查询一个根本不存在的数据， 缓存层和存储层都不会命中， 通常出于容错的考虑， 如果从存储层查不到数据则不写入缓存层。
缓存穿透将导致不存在的数据每次请求都要到存储层去查询， 失去了缓存保护后端存储的意义。
造成缓存穿透的基本原因有两个：
第一， 自身业务代码或者数据出现问题。
第二， 一些恶意攻击、 爬虫等造成大量空命中。
缓存穿透问题解决方案：
1、缓存空对象
public class SaveEmpty {


    @Autowired
    ]]></description><category></category></item><item><title><![CDATA[Redis 分布式锁]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/109251152</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/109251152</guid><author>xiaocaodeshengri</author><pubDate>Fri, 23 Oct 2020 22:40:22 +0800</pubDate><description><![CDATA[Redis 分布式锁

图是分布式锁实现原理
在spring-boot 中添加redisssion的配置以及应用
Spring Boot Starter
Integrates Redisson with Spring Boot library. Depends on Spring Data Redis module.
Supports Spring Boot 1.3.x - 2.3.x
Consider Redisson PRO version for advanced features and suppo]]></description><category></category></item><item><title><![CDATA[Redis的集群配置]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/109249556</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/109249556</guid><author>xiaocaodeshengri</author><pubDate>Fri, 23 Oct 2020 20:52:18 +0800</pubDate><description><![CDATA[redis集群是一个由多个主从节点群组成的分布式服务器群，它具有复制、高可用和分片特性。Redis集群不需要sentinel哨兵也能完成节点移除和故障转移的功能。需要将每个节点设置成集群模式，这种集群模式没有中心节点，可水平扩展，据官方文档称可以线性扩展到上万个节点(官方推荐不超过1000个节点)。redis集群的性能和高可用性均优于之前版本的哨兵模式，且集群配置非常简单

redis集群搭建

redis集群需要至少要三个master节点，我们这里搭建三个master节点，并且给每个master再搭建2.]]></description><category></category></item><item><title><![CDATA[Redis主从架构和哨兵架构]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/109191841</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/109191841</guid><author>xiaocaodeshengri</author><pubDate>Tue, 20 Oct 2020 23:21:28 +0800</pubDate><description><![CDATA[Redis主从架构

Redis主从工作原理
如果你为master配置了一个slave，不管这个slave是否是第一次连接上Master，它都会发送一个SYNC命令(redis2.8版本之前的命令)给master请求复制数据。
master收到SYNC命令后，会在后台进行数据持久化通过bgsave生成最新的rdb快照文件，持久化期间，master会继续接收客户端的请求，它会把这些可能修改数据集的请求缓存在内存中。当持久化进行完毕以后，master会把这份rdb文件数据集发送给slave，slave会把接收到]]></description><category></category></item><item><title><![CDATA[Redis的持久化]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/108987148</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/108987148</guid><author>xiaocaodeshengri</author><pubDate>Fri, 09 Oct 2020 21:57:46 +0800</pubDate><description><![CDATA[RDB快照（snapshot）
在默认情况下， Redis 将内存数据库快照保存在名字为 dump.rdb 的二进制文件中。
你可以对 Redis 进行设置， 让它在“ N 秒内数据集至少有 M 个改动”这一条件被满足时， 自动保存一次数据集。
比如说， 以下设置会让 Redis 在满足“ 60 秒内有至少有 1000 个键被改动”这一条件时， 自动保存一次数据集：
# save 60 1000
关闭RDB只需要将所有的save保存策略注释掉即可
还可以手动执行命令生成RDB快照，进入redis客户端执行命]]></description><category></category></item><item><title><![CDATA[Redis的安装]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/108957079</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/108957079</guid><author>xiaocaodeshengri</author><pubDate>Wed, 07 Oct 2020 23:03:06 +0800</pubDate><description><![CDATA[Redis的安装
安装系统的版本：

安装gcc

下载redis

下载地址：http://redis.io/download
安装步骤：
# 安装gcc
yum install gcc

# 把下载好的redis-6.0.8.tar.gz放在/usr/local文件夹下，并解压
wget http://download.redis.io/releases/redis-6.0.8.tar.gz
tar xzf redis-6.0.8.tar.gz
cd redis-6.0.8

# 进入到解压好的redi]]></description><category></category></item><item><title><![CDATA[集合类不安全问题]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/105981276</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/105981276</guid><author>xiaocaodeshengri</author><pubDate>Thu, 07 May 2020 20:52:38 +0800</pubDate><description><![CDATA[学习课程记录笔记
1、ArrayList线程安全问题
ArrayList不是线程安全类，在多线程同时写的情况下，会抛出java.util.ConcurrentModificationException异常。
private static void listNotSafe() {
        List&lt;String&gt; list = new ArrayList&lt;String&gt...]]></description><category></category></item><item><title><![CDATA[CAS理解]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/105960207</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/105960207</guid><author>xiaocaodeshengri</author><pubDate>Wed, 06 May 2020 21:55:22 +0800</pubDate><description><![CDATA[1、现象
CAS是指 Compare And Swap，比较并交换，是一种重要的同步思想，如果主内存的值和期望值一样，那么久进行修改，否则会一直重试，直到一致为止；
public class CASDemo {
    public static void main(String[] args) {
        AtomicInteger atomicInteger = new Atomic...]]></description><category></category></item><item><title><![CDATA[JMM和Votitle关键字]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/105939285</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/105939285</guid><author>xiaocaodeshengri</author><pubDate>Tue, 05 May 2020 21:26:41 +0800</pubDate><description><![CDATA[什么是JMM模型
JMM是java内存模型（Java Memory Model），不是java内存布局，不是所谓的栈、堆、方法区；
每个java线程都有自己的工作内存，操作数据时首先从主内存中读取数据，得到一份变量的拷贝，线程操作完成后再将操作结果写回主内存中；
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-lq8XVkCi-1588685070134)(C:\...]]></description><category></category></item><item><title><![CDATA[volatile和synchronized区别]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/105050106</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/105050106</guid><author>xiaocaodeshengri</author><pubDate>Mon, 23 Mar 2020 15:46:46 +0800</pubDate><description><![CDATA[这个可能是最好的对比volatile和synchronized作用的文章了。volatile是一个变量修饰符，而synchronized是一个方法或块的修饰符。所以我们使用这两种关键字来指定三种简单的存取变量的方式。int i1;                      
int geti1() {
	re...]]></description><category></category></item><item><title><![CDATA[安装Python在centos7中]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/103800854</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/103800854</guid><author>xiaocaodeshengri</author><pubDate>Thu, 02 Jan 2020 11:00:47 +0800</pubDate><description><![CDATA[我这里使用的时centos7-mini，centos系统本身默认安装有python2.x，版本x根据不同版本系统有所不同，可通过&nbsp;python --V 或 python --version 查看系统自带的python版本
有一些系统命令时需要用到python2，不能卸载
&nbsp;
1、安装依赖包&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp...]]></description><category></category></item><item><title><![CDATA[PDB调试]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/103491555</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/103491555</guid><author>xiaocaodeshengri</author><pubDate>Wed, 11 Dec 2019 14:15:27 +0800</pubDate><description><![CDATA[pdb为python程序实现了一个交互式调试环境。它包括一些特性，可以暂停程序，查看变量值，以及逐步监视程序执行，从而能了解程序具体做了什么，并查找逻辑中存在的bug。
启动调试工具
使用pdb的第一步是让解释器在适当的时候进入调试工具。可以采用很多不同的方法
达到这个目的，具体取决于起始条件和所要调试的内容。
从命令行执行
pdb的最直接的方式是通过命令行运行，命令格式如下
pyth...]]></description><category></category></item><item><title><![CDATA[安装DjianGo]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/103300627</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/103300627</guid><author>xiaocaodeshengri</author><pubDate>Thu, 28 Nov 2019 20:30:53 +0800</pubDate><description><![CDATA[&nbsp;
&nbsp;&nbsp; 安装DjianGo前必须安装Python环境，由于已经装过，这里不再贴出安装Python的步骤，我的Python版本是3.2。
&nbsp;&nbsp;
1、下载django
https://github.com/django/django/releases

2、将下载的文件解压缩，解压后的文件放到和python文件夹一样的根目录

3、运行执行...]]></description><category></category></item><item><title><![CDATA[idea 快捷键ctrl+shift+f失效的解决方案]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/103257713</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/103257713</guid><author>xiaocaodeshengri</author><pubDate>Tue, 26 Nov 2019 15:39:46 +0800</pubDate><description><![CDATA[1. 刚换了新环境，新装的idea的快捷键ctrl+shift+f按了没反应，于是想到快捷键冲突了，马上查看qq和搜狗输入法的快捷键：...]]></description><category></category></item><item><title><![CDATA[CSDN博客如何转载别人的文章（最新版详细教程）]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/103254510</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/103254510</guid><author>xiaocaodeshengri</author><pubDate>Tue, 26 Nov 2019 13:29:30 +0800</pubDate><description><![CDATA[...]]></description><category></category></item><item><title><![CDATA[XShell鼠标选中, 实现快捷复制和粘贴]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/103253763</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/103253763</guid><author>xiaocaodeshengri</author><pubDate>Tue, 26 Nov 2019 12:02:00 +0800</pubDate><description><![CDATA[原创                XShell鼠标选中, 实现快捷复制和粘贴
            
            
                
                                                                         ...]]></description><category></category></item><item><title><![CDATA[linux 下 touch: cannot touch 'catalina.out': Permission denied解决方法]]></title><link>https://blog.csdn.net/xiaocaodeshengri/article/details/103199717</link><guid>https://blog.csdn.net/xiaocaodeshengri/article/details/103199717</guid><author>xiaocaodeshengri</author><pubDate>Fri, 22 Nov 2019 14:03:12 +0800</pubDate><description><![CDATA[报以下错误：



报错原因：目录没有创建修改权限
解决办法： 所有人可操作logs文件
chmod说明(u:与文件属主拥有一样的权限[a:所有人]；+:增加权限;rwx:可读可写可执行）
-R:递归所有目录和文件

进入到tomat的目录中，找到有该文件夹的目录，执行下面命令。意思就是改变logs文件夹的权限，使tomcat可以有权限访问此文件夹。
[root@hm01 ~]# chmod a...]]></description><category></category></item></channel></rss>