<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[个人博客]]></title><description><![CDATA[只限于自己记录一些东西,分享与大家]]></description><link>https://blog.youkuaiyun.com/weixin_45286347</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; weixin_45286347]]></copyright><item><title><![CDATA[Mybatis拦截器获取xml文件最终执行的sql语句]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/127049161</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/127049161</guid><author>weixin_45286347</author><pubDate>Mon, 26 Sep 2022 10:36:37 +0800</pubDate><description><![CDATA[【代码】Mybatis拦截器获取xm文件最终执行的sql语句。]]></description><category></category></item><item><title><![CDATA[java stream 简单使用]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/124150337</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/124150337</guid><author>weixin_45286347</author><pubDate>Wed, 13 Apr 2022 16:48:27 +0800</pubDate><description><![CDATA[java stream流进行内存分页stream 进行内存分页stream 处理null字段的排序stream 过滤出不存在另一个list里面的数据stream 过滤出存在另一个list里面的数据stream 删除Map中值为空的数据
stream 进行内存分页
int pageSize=templateCompanyListRequest.getPageSize();
int pageNum=templateCompanyListRequest.getPageNum();
int skipNum = pa]]></description><category></category></item><item><title><![CDATA[mybatis二级缓存]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/124149359</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/124149359</guid><author>weixin_45286347</author><pubDate>Wed, 13 Apr 2022 15:44:45 +0800</pubDate><description><![CDATA[mybatis二级缓存Mybatis中一级缓存 和 二级缓存的区别一级缓存(本地缓存)二级缓存(全局缓存)二级缓存开启mybatis解读总结
Mybatis中一级缓存 和 二级缓存的区别
两者区别：一级缓存的作用域是在SqlSession中，二级缓存的作用域是针对mapper做缓存。
一级缓存(本地缓存)
一级缓存是框架默认为我们开启的，我们不需要做任何配置。
例如我们首次查询id为1的用户，mybatis会将该用户的对象存储在一级缓存中；
如果在此中间 sqlSession 执行了commit操作(增删改]]></description><category></category></item><item><title><![CDATA[Mybatis使用]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/124145758</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/124145758</guid><author>weixin_45286347</author><pubDate>Wed, 13 Apr 2022 15:06:45 +0800</pubDate><description><![CDATA[Mybatis使用collection标签代码mappermapper.xmlforeach标签delete批量删除代码mappermapper.xmlinsert批量添加代码mappermapper.xmlselect代码mapper.xmlif 标签代码mapper.xmlwhere 标签代码mapper.xmltrim 标签代码mapper.xmlset 标签代码mapper.xmlbind 标签代码mapper.xmlchoose、when、otherwise 标签代码mapper.xml
coll]]></description><category></category></item><item><title><![CDATA[RestTemplate 的 exchange 接口请求]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/122576378</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/122576378</guid><author>weixin_45286347</author><pubDate>Wed, 19 Jan 2022 11:22:53 +0800</pubDate><description><![CDATA[RestTemplate 的 exchange 接口请求get 请求post 请求
get 请求
String urlStr = "url";
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(urlStr)
                .queryParam("参数1", "....")
                .queryParam("参数2", "....");
HttpHeaders headers = new]]></description><category></category></item><item><title><![CDATA[字符串操作]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/121529854</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/121529854</guid><author>weixin_45286347</author><pubDate>Thu, 25 Nov 2021 09:06:56 +0800</pubDate><description><![CDATA[字符串按照每两位插入一个空格
    public static String toStr(String str){
        String regex = "(.{2})";
        str = str.replaceAll(regex,"$1 ");
        return str;
    }


]]></description><category></category></item><item><title><![CDATA[java -MD5加密]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/121521596</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/121521596</guid><author>weixin_45286347</author><pubDate>Wed, 24 Nov 2021 18:08:27 +0800</pubDate><description><![CDATA[java -MD5加密
    public static String md5(String plainText) {
        if (null == plainText) {
            plainText = "";
        }
        String mD5Str = null;
        try {
            // JDK 支持以下6种消息摘要算法，不区分大小写
            // md5,sha(sha-1),md2,sha-256]]></description><category></category></item><item><title><![CDATA[springboot数据库连接]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/106978154</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/106978154</guid><author>weixin_45286347</author><pubDate>Tue, 16 Nov 2021 14:31:08 +0800</pubDate><description><![CDATA[springboot2.3.1与springboot1.5连接数据库的差别1.Spring Boot 2.3.1与Spring Boot 1.5 默认数据源1.springboot2.3.1默认数据源2.HikariDataSource优点2.springboot连接数据库配置1.springboot连接数据库配置文件
1.Spring Boot 2.3.1与Spring Boot 1.5 默认数据源
1.springboot2.3.1默认数据源
Spring Boot 2.3.1 默认使用 com.zax]]></description><category></category></item><item><title><![CDATA[Springboot声明式事务和编程式事务]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/121354099</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/121354099</guid><author>weixin_45286347</author><pubDate>Tue, 16 Nov 2021 14:05:52 +0800</pubDate><description><![CDATA[声明式事务–@Transactional
声明式事务一般使用@Transactional注解，标注该注解的方法具有事务能力，出现异常会进行回滚。

但是，使用@Transactional注解事务粒度比较大，有时候可能不适合自己的业务场景，我们在不需要对整个方法进行事务管理，而是对指定的数据库操作代码进行添加事务，那么我们需要使用编程式事务管理
编程式事务–TransactionTemplate
TransactionTemplate 源码
编程式事务一般使用 TransactionTemplate ，还可以]]></description><category></category></item><item><title><![CDATA[linux系统将zookeeper服务设置为开机自启]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/121275882</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/121275882</guid><author>weixin_45286347</author><pubDate>Thu, 11 Nov 2021 20:50:50 +0800</pubDate><description><![CDATA[首先进入开机启动的目录（# cd /etc/rc.d/init.d）

创建zookeeper文件夹
touch zookeeper

将zookeeper文件设置为可执行文件
chmod +x zookeeper

编辑zookeeper文件
vim zookeeper
添加一下内容
#!/bin/bash
#chkconfig:2345 20 90
#description:zookeeper
#processname:zookeeper
# export JAVA_HOME=/usr/java/jdk]]></description><category></category></item><item><title><![CDATA[java8时间日期]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/120487648</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/120487648</guid><author>weixin_45286347</author><pubDate>Mon, 27 Sep 2021 18:02:14 +0800</pubDate><description><![CDATA[java8时间日期LocalDate / LocalTime / LocalDateTimeZonedDateTime和OffsetDateTime
LocalDate / LocalTime / LocalDateTime
LocalDate ，日期的API，表示没有时间的日期格式
LocalTime ，表示不带日期的时间格式
LocalDateTime ，表示时间日期格式
ZonedDateTime和OffsetDateTime
ZonedDateTime：表示区域时间日期
OffsetDateTime]]></description><category></category></item><item><title><![CDATA[java-RSA数据加密]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/120501369</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/120501369</guid><author>weixin_45286347</author><pubDate>Mon, 27 Sep 2021 13:40:38 +0800</pubDate><description><![CDATA[java-RSA数据加密生成RSA公钥和私钥下载openssl（或者在线生成）
生成RSA公钥和私钥
下载openssl（或者在线生成）
在线生成非对称加密公钥私钥对：选择PKCS8格式，net,ios中RSA加解密使用的是PKCS1，而java使用的是PKCS8。按1024取模(通常都是1024)，PKCS1格式的私钥长度应该是812，而PKCS8的格式的密钥长度为861。

将生成的公钥和秘钥复制到文件中，将文件后缀改为.pem，或者将

...]]></description><category></category></item><item><title><![CDATA[数组转为集合的方法解析]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/118991931</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/118991931</guid><author>weixin_45286347</author><pubDate>Thu, 22 Jul 2021 10:43:51 +0800</pubDate><description><![CDATA[数组转为集合的方法Arrays.asList()方法转为集合asList源码jdk1.8中，将数组转为stream流，使用collect(Collectors.toList())toList源码总结
Arrays.asList()方法转为集合
	@Test
    void testAsList() {
        String[] str = new String[] { "qqq", "kkk" };
        List list = Arrays.asList(str);
        l]]></description><category></category></item><item><title><![CDATA[Oracle账号登录]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/118893300</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/118893300</guid><author>weixin_45286347</author><pubDate>Mon, 19 Jul 2021 12:47:48 +0800</pubDate><description><![CDATA[Oracle账号登录
http://bugmenot.com/view/oracle.com

]]></description><category></category></item><item><title><![CDATA[集合遍历时删除元素]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/118671331</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/118671331</guid><author>weixin_45286347</author><pubDate>Mon, 12 Jul 2021 11:30:25 +0800</pubDate><description><![CDATA[集合遍历时删除元素二级目录使用迭代器的remove方法倒序遍历删除
二级目录
使用迭代器的remove方法
使用迭代器的remove方法，而不是集合的remove方法。这是因为，迭代器的remove方法会修改expectedModCount，从而使modCount与之相等
public void remove() {
            if (lastRet &lt; 0)
                throw new IllegalStateException();
            c]]></description><category></category></item><item><title><![CDATA[Spring依赖注入原理（DI）]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/118668454</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/118668454</guid><author>weixin_45286347</author><pubDate>Mon, 12 Jul 2021 09:48:41 +0800</pubDate><description><![CDATA[Spring依赖注入原理（DI）DI: 依赖注入第一种注入方式: 使用set方法进行注入（setter注入）第二种注入方式: 使用有参构造进行注入（构造器注入）第三种注入方式: p名称空间注入 (了解)
DI: 依赖注入
第一种注入方式: 使用set方法进行注入（setter注入）
(1)创建类, 定义属性和对应的set方法
/**
 * 演示使用setter方法进行注入属性
 */
public class Book {
    //创建属性
    private String bname;
    p]]></description><category></category></item><item><title><![CDATA[HashSet 底层数据结构]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/118633343</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/118633343</guid><author>weixin_45286347</author><pubDate>Sat, 10 Jul 2021 12:01:11 +0800</pubDate><description><![CDATA[HashSet 底层数据结构HashSet源码HashSet的 add(E e) 方法
HashSet 底层数据结构是HashMap ，无参构造方法会创建一个初始容量为16，加载因子为0.75的HashMap
HashSet源码
public class HashSet extends AbstractSet implements Set, Cloneable,Serializable {
              private transient HashMap map;
              ]]></description><category></category></item><item><title><![CDATA[HashMap底层数据结构]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/118633042</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/118633042</guid><author>weixin_45286347</author><pubDate>Sat, 10 Jul 2021 11:51:48 +0800</pubDate><description><![CDATA[HashMap底层数据结构HashMap的put原理HashMap代码扰动函数：putVal方法：
HashMap的put原理
JDK1.8中，HashMap采用位桶+链表+红黑树实现，当map集合中总数量达到64个并且链表长度超过阈值（8）时，将链表转换为红黑树，这样大大减少了查找时间。

HashMap代码
public V put(K key, V value) {
	return putVal(hash(key), key, value, false, true);
}

扰动函数：
static ]]></description><category></category></item><item><title><![CDATA[HashCode特性与作用]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/118632962</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/118632962</guid><author>weixin_45286347</author><pubDate>Sat, 10 Jul 2021 11:27:50 +0800</pubDate><description><![CDATA[HashCode特性与作用HashCode特性HashCode作用
HashCode特性
（1）HashCode的存在主要是用于快速查找，如GC查找要回收的对象,Hashtable，HashMap等，HashCode经常用于确定对象的存储地址；
（2）如果两个对象相同，hashcode一定相同,并且equals方法一定返回true；
（3）两个对象的HashCode相同，并不一定表示两个对象就相同，即equals()不一定为true，只能说明这两个对象在一个散列存储结构中。
（4）如果对象的equals方法]]></description><category></category></item><item><title><![CDATA[map遍历的四种方式]]></title><link>https://blog.youkuaiyun.com/weixin_45286347/article/details/115218881</link><guid>https://blog.youkuaiyun.com/weixin_45286347/article/details/115218881</guid><author>weixin_45286347</author><pubDate>Thu, 25 Mar 2021 21:18:54 +0800</pubDate><description><![CDATA[map遍历的四种方式entrySet遍历keySet或values遍历Iterator遍历forEach遍历(java8)
entrySet遍历
Map&lt;Employee.Status, List&lt;Employee&gt;&gt; group = emps.stream()
                .collect(Collectors.groupingBy(Employee::getStatus));
// 1. entrySet遍历，在键和值都需要时使用（最常用）
        f]]></description><category></category></item></channel></rss>