<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[wangzhen的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/qq_21150865</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; qq_21150865]]></copyright><item><title><![CDATA[java8中optional的使用]]></title><link>https://blog.csdn.net/qq_21150865/article/details/88999052</link><guid>https://blog.csdn.net/qq_21150865/article/details/88999052</guid><author>qq_21150865</author><pubDate>Wed, 03 Apr 2019 16:40:52 +0800</pubDate><description><![CDATA[java8中optional的使用
​	我们在写java代码中，尤其是业务代码，如果一个类的组合以及级联关系过多时，很容易造成空指针异常，如下面一个例子：
//人
public class Person {
    private Car car;

    public Car getCar() {
        return car;
    }
}

//车
public class Ca...]]></description><category></category></item><item><title><![CDATA[MyBatis运行原理与解析]]></title><link>https://blog.csdn.net/qq_21150865/article/details/84305338</link><guid>https://blog.csdn.net/qq_21150865/article/details/84305338</guid><author>qq_21150865</author><pubDate>Tue, 20 Nov 2018 16:45:24 +0800</pubDate><description><![CDATA[文章目录一、项目结构二、mybatis内部运行原理解析
MyBatis的运行主要有两大部分：一是读取配置文件到Configuration，用来创建SqlSessionFactory，二是执行SqlSession。前者容易理解，后者的执行处理过程比较复杂，需要涉及到反射以及动态代理技术，接下来通过一个最基础的demo来分析一下mybatis的运行过程。（前方大量代码，引起极度不适者回避）
一、项目结...]]></description><category></category></item><item><title><![CDATA[使用springboot自定义starter]]></title><link>https://blog.csdn.net/qq_21150865/article/details/83504780</link><guid>https://blog.csdn.net/qq_21150865/article/details/83504780</guid><author>qq_21150865</author><pubDate>Mon, 29 Oct 2018 13:57:42 +0800</pubDate><description><![CDATA[
创建一个maven项目，在pom文件中添加如下依赖：

&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
&amp;lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
        xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
        xs...]]></description><category></category></item><item><title><![CDATA[一致性哈希算法原理]]></title><link>https://blog.csdn.net/qq_21150865/article/details/80885934</link><guid>https://blog.csdn.net/qq_21150865/article/details/80885934</guid><author>qq_21150865</author><pubDate>Mon, 02 Jul 2018 16:14:55 +0800</pubDate><description><![CDATA[
        
            一致性哈希算法原理
        
        

　　一致性哈希算法在1997年由麻省理工学院的Karger等人在解决分布式Cache中提出的，设计目标是为了解决因特网中的热点(Hot spot)问题，初衷和CARP十分类似。一致性哈希修正了CARP使用的简单哈希算法带来的问题，使得DHT可以在P2P环境中真正得到应用。

　　但现在一致性has...]]></description><category></category></item><item><title><![CDATA[Centos7配置yum源]]></title><link>https://blog.csdn.net/qq_21150865/article/details/80233475</link><guid>https://blog.csdn.net/qq_21150865/article/details/80233475</guid><author>qq_21150865</author><pubDate>Mon, 07 May 2018 23:38:49 +0800</pubDate><description><![CDATA[


Centos7配置yum源
操作步骤：











Centos7配置yum源

在centos系统中使用yum命令来安装软件时，默认会从国外的网站下载，速度十分缓慢，因此可以配置阿里的yum源。



操作步骤：


备份：mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
下...]]></description><category></category></item><item><title><![CDATA[3、Redis集群部署]]></title><link>https://blog.csdn.net/qq_21150865/article/details/80116285</link><guid>https://blog.csdn.net/qq_21150865/article/details/80116285</guid><author>qq_21150865</author><pubDate>Sat, 28 Apr 2018 09:41:36 +0800</pubDate><description><![CDATA[

Redis集群部署
Redis集群架构图
Redis集群搭建









Redis集群部署



Redis集群架构图

集群架构图：



Redis容错机制： 


架构说明:

(1)所有的redis节点彼此互联(使用PING-PONG机制),内部使用二进制协议优化传输速度和带宽。

(2)节点的fail是通过集群中超过半数的节点检测失效时才生效。

(3)客户端与redis节点...]]></description><category></category></item><item><title><![CDATA[2、Redis持久化以及主从复制]]></title><link>https://blog.csdn.net/qq_21150865/article/details/80116256</link><guid>https://blog.csdn.net/qq_21150865/article/details/80116256</guid><author>qq_21150865</author><pubDate>Sat, 28 Apr 2018 09:39:51 +0800</pubDate><description><![CDATA[

Redis持久化以及主从复制
Redis的持久化方案
Redis主从复制
1.介绍
2.配置：
3.主从复制过程











Redis持久化以及主从复制



Redis的持久化方案

​   Redis的高性能是由于其将所有数据都存储在了内存中，为了使Redis在重启之后仍能保证数据不丢失，需要将数据从内存中同步到硬盘中，这一过程就是持久化。

​   Redis支持两种方式的持...]]></description><category></category></item><item><title><![CDATA[1、Redis安装以及五种基本数据类型]]></title><link>https://blog.csdn.net/qq_21150865/article/details/80115935</link><guid>https://blog.csdn.net/qq_21150865/article/details/80115935</guid><author>qq_21150865</author><pubDate>Sat, 28 Apr 2018 09:37:14 +0800</pubDate><description><![CDATA[

Redis入门
Redis安装
Redis五种基本数据类型
1、String：key-value（做缓存）类型
2、Hash：key-fields-values（做缓存）
3、List：有顺序可重复
4、Set：元素无顺序，不能重复
5、zset：sorted set：有序集合











Redis入门



Redis安装


Redis下载地址](http://redis.io...]]></description><category></category></item><item><title><![CDATA[java值传递的问题]]></title><link>https://blog.csdn.net/qq_21150865/article/details/79789132</link><guid>https://blog.csdn.net/qq_21150865/article/details/79789132</guid><author>qq_21150865</author><pubDate>Mon, 02 Apr 2018 14:44:22 +0800</pubDate><description><![CDATA[为什么说Java中只有值传递]]></description><category></category></item><item><title><![CDATA[克隆]]></title><link>https://blog.csdn.net/qq_21150865/article/details/79788515</link><guid>https://blog.csdn.net/qq_21150865/article/details/79788515</guid><author>qq_21150865</author><pubDate>Mon, 02 Apr 2018 14:06:20 +0800</pubDate><description><![CDATA[



克隆

java中实现克隆的方式有两种，一种是实现Cloneable接口，这种方式会存在深拷贝和浅拷贝的问题。另一种是实现Serializable接口，通过序列化的方式进行克隆，反序列话会生成崭新的对象。



实现Cloneable接口


浅拷贝(Object类中的clone()方法)是指在拷贝对象时，对于基本数据类型的变量会重新复制一份，而对于引用类型的变量只是对引用进行拷贝。
深拷...]]></description><category></category></item><item><title><![CDATA[动态代理]]></title><link>https://blog.csdn.net/qq_21150865/article/details/79554070</link><guid>https://blog.csdn.net/qq_21150865/article/details/79554070</guid><author>qq_21150865</author><pubDate>Wed, 14 Mar 2018 14:20:33 +0800</pubDate><description><![CDATA[最近在看spring的aop，由于aop底层原理使用动态代理实现的，所以对动态代理做一番研究。 
动态代理分为两种，jdk动态代理和CGlib动态代理

1、jdk动态代理

jdk动态代理的一个要求是必须只能为接口创建代理实例。接下来来看代码： 
 -  定义一个普通接口

package com.wisdom.jdkproxy;

/******************************...]]></description><category></category></item><item><title><![CDATA[Java 虚拟机体系结构]]></title><link>https://blog.csdn.net/qq_21150865/article/details/79450436</link><guid>https://blog.csdn.net/qq_21150865/article/details/79450436</guid><author>qq_21150865</author><pubDate>Mon, 05 Mar 2018 20:16:37 +0800</pubDate><description><![CDATA[Java 虚拟机体系结构]]></description><category></category></item><item><title><![CDATA[IntelliJ IDEA推荐]]></title><link>https://blog.csdn.net/qq_21150865/article/details/79408876</link><guid>https://blog.csdn.net/qq_21150865/article/details/79408876</guid><author>qq_21150865</author><pubDate>Thu, 01 Mar 2018 10:19:40 +0800</pubDate><description><![CDATA[Java人员正确使用 IntelliJ IDEA的方式 
]]></description><category></category></item><item><title><![CDATA[Java通过Jedis连接Redis异常，错误记录]]></title><link>https://blog.csdn.net/qq_21150865/article/details/79377340</link><guid>https://blog.csdn.net/qq_21150865/article/details/79377340</guid><author>qq_21150865</author><pubDate>Mon, 26 Feb 2018 15:04:28 +0800</pubDate><description><![CDATA[


紧接上一篇文章，Centos7下Redis安装教程
我用Jedis连接Redis时报错，代码和错误如下图 
 



解决方案： 在redis.conf这个配置文件中，找到bind和protected-mode这两个属性，将其修改。 
默认： 
 
 
修改后： 
 


在vmware中创建centos7虚拟机并安装Redis后，如果以redis.conf配置文件运行的话，只能本机（仅仅是...]]></description><category></category></item><item><title><![CDATA[Centos7下Redis安装教程]]></title><link>https://blog.csdn.net/qq_21150865/article/details/79365206</link><guid>https://blog.csdn.net/qq_21150865/article/details/79365206</guid><author>qq_21150865</author><pubDate>Sat, 24 Feb 2018 20:32:06 +0800</pubDate><description><![CDATA[
Redis下载地址，约定版本号最后一位偶数为稳定版本，奇数为非稳定版本，我这里下载的是redis-4.0.8版本
在/usr/local下新建redis目录，将下载的redis压缩包上传至/usr/local/redis目录下
解压并安装（需要注意的是安装redis需要先将官网下载的源码进行编译，编译依赖gcc环境，如果没有gcc环境，需要安装，输入gcc：yum install gcc-c++...]]></description><category></category></item><item><title><![CDATA[CentOS7下 搭建 FastDFS 分布式文件服务器]]></title><link>https://blog.csdn.net/qq_21150865/article/details/79358777</link><guid>https://blog.csdn.net/qq_21150865/article/details/79358777</guid><author>qq_21150865</author><pubDate>Sat, 24 Feb 2018 09:41:56 +0800</pubDate><description><![CDATA[

FastDFS介绍

1.FastDFS是什么
2.FastDFS架构
3.Tracker集群
4.Storage集群
5.Storage状态收集
6.文件上传、下载流程




FastDFS服务器搭建

1.安装libfastcommon
2.安装FastDFS
3.配置Tracker
4.配置Storage
5.测试
6.安装fastdfs-nginx-module
a.storage ...]]></description><category></category></item><item><title><![CDATA[Python基础四之函数]]></title><link>https://blog.csdn.net/qq_21150865/article/details/79320843</link><guid>https://blog.csdn.net/qq_21150865/article/details/79320843</guid><author>qq_21150865</author><pubDate>Tue, 13 Feb 2018 11:44:44 +0800</pubDate><description><![CDATA[&quot;&quot;&quot;
函数：
1.示例
2.带参数的打印
3.传递参数(位置实参和关键字实参)
4.为形参指定默认值
5.return返回值
6.可选参数
&quot;&quot;&quot;


# 1.示例
def greet():
    print(&quot;hello&quot;)


# 调用函数
greet()  # 输出结果:hello


# 2.带参数的打印
def greet(username):
    print(&quot;hello &quot; ...]]></description><category></category></item><item><title><![CDATA[Linux系统下Nginx反向代理Tomcat集群]]></title><link>https://blog.csdn.net/qq_21150865/article/details/79311253</link><guid>https://blog.csdn.net/qq_21150865/article/details/79311253</guid><author>qq_21150865</author><pubDate>Sun, 11 Feb 2018 15:49:08 +0800</pubDate><description><![CDATA[环境介绍


Centos7 X64
nginx-1.8.0
Tomcat 8.5




一、安装nginx

1.将下载的linux下的Nginx压缩包上传至/usr/local/nginx目录。（nginx下载地址） 

2.使用tar -vxf命令解压 nginx压缩包，进入解压后的目录中，发现该目录下并没有可执行的程序，在这里还需要安装一下编译环境。 
 

3.编译环境介绍。（需要有联...]]></description><category></category></item><item><title><![CDATA[Python基础三之字典操作]]></title><link>https://blog.csdn.net/qq_21150865/article/details/79299377</link><guid>https://blog.csdn.net/qq_21150865/article/details/79299377</guid><author>qq_21150865</author><pubDate>Fri, 09 Feb 2018 16:03:45 +0800</pubDate><description><![CDATA[&quot;&quot;&quot;
字典：(个人认为可以当做是json字符串去学习，内部存储的都是键值对)
1.示例
2.添加键值对
3.修改字典中指定键的值
4.删除键值对
5.遍历字典
6.遍历字典中的所有键,keys()
7.使用sorted()按顺序遍历字典中的所有键(使用keys()实际上返回的是一个列表)
8.遍历字典中的所有值values()
9.使用集合set()可以再遍历出来的值列表中剔除其中的重复值
10...]]></description><category></category></item><item><title><![CDATA[Python基础二之简单列表操作补充]]></title><link>https://blog.csdn.net/qq_21150865/article/details/79289696</link><guid>https://blog.csdn.net/qq_21150865/article/details/79289696</guid><author>qq_21150865</author><pubDate>Thu, 08 Feb 2018 14:53:39 +0800</pubDate><description><![CDATA[简单列表操作



&quot;&quot;&quot;
1.遍历列表
2.python利用缩进来判断代码行与前一个代码行之间的关系
3.创建数值列表,range()函数能够生成一系列的数字
4.range()中还可以指定第三个参数，表示步长
5.list()函数可以将range()的结果直接转变为列表
6.找出列表中的最大、最小值，求和。min()、max()、sum()
7.列表解析
8.获取列表中指定索引段的元素，pyt...]]></description><category></category></item></channel></rss>