<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Forest24的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/Forest24</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; Forest24]]></copyright><item><title><![CDATA[在有序数组中，找到满足 ＞= value 的最左位置（二分查找）]]></title><link>https://blog.csdn.net/Forest24/article/details/146178768</link><guid>https://blog.csdn.net/Forest24/article/details/146178768</guid><author>Forest24</author><pubDate>Tue, 11 Mar 2025 14:42:33 +0800</pubDate><description><![CDATA[【代码】在有序数组中，找到满足 ＞= value 的最左位置（二分查找）]]></description><category></category></item><item><title><![CDATA[B+ 树与 B 树的区别]]></title><link>https://blog.csdn.net/Forest24/article/details/145571707</link><guid>https://blog.csdn.net/Forest24/article/details/145571707</guid><author>Forest24</author><pubDate>Tue, 11 Feb 2025 14:49:14 +0800</pubDate><description><![CDATA[只有叶子节点存储实际的数据记录，而所有的内部节点仅用于索引，它们存储指向子节点的指针以及该范围内的最小/最大键值。：由于 B+ 树的内部节点不存储数据，而是专注于索引，这使得每个节点可以包含更多的键值，进而减少了树的高度。：因为内部节点只包含索引信息，所以能更高效地利用空间，允许更大的扇出（每个节点的孩子数目更多），从而降低了树的高度，减少了磁盘I/O次数。：虽然也能提供较好的查询性能，但由于需要在每个节点内查找具体的数据位置，对于大规模数据集来说效率不如 B+ 树。：没有特殊的叶子节点之间的链接机制。]]></description><category></category></item><item><title><![CDATA[一个转发请求的方法]]></title><link>https://blog.csdn.net/Forest24/article/details/143433269</link><guid>https://blog.csdn.net/Forest24/article/details/143433269</guid><author>Forest24</author><pubDate>Fri, 01 Nov 2024 15:31:31 +0800</pubDate><description><![CDATA[【代码】一个转发请求的方法。]]></description><category></category></item><item><title><![CDATA[try-catch-finally执行顺序]]></title><link>https://blog.csdn.net/Forest24/article/details/131766338</link><guid>https://blog.csdn.net/Forest24/article/details/131766338</guid><author>Forest24</author><pubDate>Mon, 17 Jul 2023 14:52:13 +0800</pubDate><description><![CDATA[1、不管有没有出现异常，finally块中代码都会执行；


2、当try和catch中有return时，finally仍然会执行；


3、finally是在return后面的表达式运算后执行的（此时并没有返回运算后的值，而是先把要返回的值保存起来，不管finally中的代码怎么样，返回的值都不会改变，仍然是之前保存的值），所以函数返回值是在finally执行前确定的；


4、finally中最好不要包含return，否则程序会提前退出，返回值不是try或catch中保存的返回值。

最终结论：任何执行]]></description><category></category></item><item><title><![CDATA[Bean的生命周期]]></title><link>https://blog.csdn.net/Forest24/article/details/129677057</link><guid>https://blog.csdn.net/Forest24/article/details/129677057</guid><author>Forest24</author><pubDate>Mon, 20 Mar 2023 21:36:21 +0800</pubDate><description><![CDATA[Bean的完整生命周期经历了各种方法调用，这些方法可以划分为以下几类：生命周期简单说明：]]></description><category></category></item><item><title><![CDATA[什么是JMM]]></title><link>https://blog.csdn.net/Forest24/article/details/129675825</link><guid>https://blog.csdn.net/Forest24/article/details/129675825</guid><author>Forest24</author><pubDate>Mon, 20 Mar 2023 20:43:32 +0800</pubDate><description><![CDATA[先全局描述： 在处理指令时，CPU会拉取数据，优先级是从L1到L2到L3，如果都没有，需要去主内存中拉取，JMM就是在CPU和主内存之间，来协调，保证可见、有序性等操作。缓存是CPU的缓存，CPU的缓存分为L1（线程独享），L2（内核独享），L3（多核共享）JMM就是Java内存模型的核心，可见性，有序性都基于这实现。CPU核心，就是CPU核心（寄存器）主内存JVM，就是你堆内存。]]></description><category></category></item><item><title><![CDATA[服务器重启后jar包自动重启]]></title><link>https://blog.csdn.net/Forest24/article/details/129280703</link><guid>https://blog.csdn.net/Forest24/article/details/129280703</guid><author>Forest24</author><pubDate>Wed, 01 Mar 2023 14:26:09 +0800</pubDate><description><![CDATA[添加本地Java环境，这两句必须添加！不然报错，找不到java命令。#系统引导后延迟5秒执行脚本，以保证稳定性。将自起脚本代码加入系统引导文件。]]></description><category></category></item><item><title><![CDATA[单链表双链表的反转]]></title><link>https://blog.csdn.net/Forest24/article/details/123969385</link><guid>https://blog.csdn.net/Forest24/article/details/123969385</guid><author>Forest24</author><pubDate>Tue, 05 Apr 2022 14:58:38 +0800</pubDate><description><![CDATA[单链表反转：


public class Node {

    public int value;

    public Node next;

    public Node(int value) {
        this.value = value;
    }
}

public class Test {

    public static void main(String[] args) {
        Node n1 = new Node(1);
        n1.next =]]></description><category></category></item><item><title><![CDATA[Redis学习笔记--SortedSet]]></title><link>https://blog.csdn.net/Forest24/article/details/121548537</link><guid>https://blog.csdn.net/Forest24/article/details/121548537</guid><author>Forest24</author><pubDate>Fri, 26 Nov 2021 09:21:32 +0800</pubDate><description><![CDATA[SortedSet：按照分值排序的set

zadd k1 3 apple 7 banana 9 orange：添加元素及分值

zrange 0 -1 withscores：按索引取出

zrangebyscore k1 3 7：按分值取出

zscore k1 apple：根据元素取分值

zrank k1 apple：根据元素取排名

zincrby k1 apple 5：元素apple分值加5




...]]></description><category></category></item><item><title><![CDATA[Ionic + Angular创建一个App的小demo]]></title><link>https://blog.csdn.net/Forest24/article/details/121491748</link><guid>https://blog.csdn.net/Forest24/article/details/121491748</guid><author>Forest24</author><pubDate>Tue, 23 Nov 2021 14:03:24 +0800</pubDate><description><![CDATA[1、安装Node.js

2、Install Ionic Tooling：npm install -g @ionic/cli native-run cordova-res

3、Create an App：ionic start myApp tabs

这里，myApp是项目名称，tabs是启动模板，项目类型是angular。

tabs不是唯一可用的项目模板。在所有项目类型之间，有三个模板可用：

tabs：基于选项卡的布局
	sidemenu：基于侧边菜单的布局
	blank: 一个单页的空项目
ion]]></description><category></category></item><item><title><![CDATA[Redis学习笔记--set]]></title><link>https://blog.csdn.net/Forest24/article/details/121482237</link><guid>https://blog.csdn.net/Forest24/article/details/121482237</guid><author>Forest24</author><pubDate>Mon, 22 Nov 2021 22:39:10 +0800</pubDate><description><![CDATA[特征：无序，去重

sadd k1 a b a c d a e f：添加元素

smembers k1：查看。a会被去重操作

srem k1 d：删除k1中的d

sadd k2 1 2 3 4 5

sadd k3 4 5 6 7 8

sinter k2 k3：取k2 k3交集的结果，即4 5

sinterstore result k2 k3：取k2 k3交集的结果放入key result中

sunion k2 k3：取k2 k3并集的结果，即1 2 3 4 5 6 7 8

sunionstor]]></description><category></category></item><item><title><![CDATA[Redis学习笔记--hash]]></title><link>https://blog.csdn.net/Forest24/article/details/121481765</link><guid>https://blog.csdn.net/Forest24/article/details/121481765</guid><author>Forest24</author><pubDate>Mon, 22 Nov 2021 22:07:16 +0800</pubDate><description><![CDATA[类似于集合中的Map

hset tom name tom：存key为tom的name为tom

hmset tom age 18 address shanghai：批量存key为tom的age address

hget tom name：取key为tom的name

hmget tom name age：批量取key为tom的name age

hkeys tom：key为tom的所有字段

hincrbyfloat tom age 0.5：key为tom的age加0.5
...]]></description><category></category></item><item><title><![CDATA[Redis学习笔记--list]]></title><link>https://blog.csdn.net/Forest24/article/details/121431825</link><guid>https://blog.csdn.net/Forest24/article/details/121431825</guid><author>Forest24</author><pubDate>Fri, 19 Nov 2021 21:52:39 +0800</pubDate><description><![CDATA[list
]]></description><category></category></item><item><title><![CDATA[Redis学习笔记--string、bitmap]]></title><link>https://blog.csdn.net/Forest24/article/details/121237646</link><guid>https://blog.csdn.net/Forest24/article/details/121237646</guid><author>Forest24</author><pubDate>Tue, 09 Nov 2021 22:27:51 +0800</pubDate><description><![CDATA[String字符串：

set k1 keyName nx：只有keyName不存在的时候才能设置成功，可实现分布式锁。

set k1 keyName xx：只有keyName存在的时候才能设置成功，即更新操作。

mset k1 a k2 b

mget k1 k2

批量set和get。

append k1 "hello"：将"hello"追加到k1字符串的后面。

getrange k1 3 4：取k1的第4个到第五个字符。

getrange k1 3 -1：取k1的第4个到最后一个字符，利用.]]></description><category></category></item><item><title><![CDATA[Java反射]]></title><link>https://blog.csdn.net/Forest24/article/details/120982939</link><guid>https://blog.csdn.net/Forest24/article/details/120982939</guid><author>Forest24</author><pubDate>Tue, 26 Oct 2021 22:53:33 +0800</pubDate><description><![CDATA[Java反射机制是在运行状态中，对于任意一个类，都能够知道这个类的所有属性和方法；对于任意一个对象，都能够调用它的任意方法和属性；这种动态获取信息以及动态调用对象方法的功能称为java语言的反射机制。

在编译后产生字节码文件的时候，类加载器子系统通过二进制字节流，负责从文件系统加载class文件。

在执行程序（java.exe）时候，将字节码文件读入JVM中---&gt;这个过程叫做类的加载。然后在内存中对应创建一个java.lang.Class对象--&gt;这个对象会被放入字节码信息中,这个Clas]]></description><category></category></item><item><title><![CDATA[SpringBoot动态刷新yml中的配置]]></title><link>https://blog.csdn.net/Forest24/article/details/119917216</link><guid>https://blog.csdn.net/Forest24/article/details/119917216</guid><author>Forest24</author><pubDate>Wed, 25 Aug 2021 18:33:34 +0800</pubDate><description><![CDATA[/**
 * 动态刷新yml配置Controller
 * @author Forest
 */
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/refresh")
public class RefreshYmlController {

    private final ContextRefresher contextRefresher;

    private final MockConfig mockConfig.]]></description><category></category></item><item><title><![CDATA[项目打jar包后resources目录下文件的读取]]></title><link>https://blog.csdn.net/Forest24/article/details/112564922</link><guid>https://blog.csdn.net/Forest24/article/details/112564922</guid><author>Forest24</author><pubDate>Wed, 13 Jan 2021 14:50:47 +0800</pubDate><description><![CDATA[1.踩坑，本地编辑器运行，这种方式完全可以


ClassPathResource classPathResource = new ClassPathResource("/template.xlsx");

InputStream inputStream = classPathResource.getInputStream();

2.一旦项目打包jar发布到服务器上就会出问题



原因：

在本地进行调试时，文件是真实存在于磁盘的某个目录。此时通过获取文件路径，是可以正常读取的，因为文件确实存在。

.]]></description><category></category></item><item><title><![CDATA[生活应该过成现在的样子吗？]]></title><link>https://blog.csdn.net/Forest24/article/details/109576657</link><guid>https://blog.csdn.net/Forest24/article/details/109576657</guid><author>Forest24</author><pubDate>Mon, 09 Nov 2020 14:13:28 +0800</pubDate><description><![CDATA[从小，或者说从我们有自己的独立想法时，我们就喜欢畅想自己未来是什么样子。但不知大家有没有一种感觉，我们活得越来越不像自己当年想象的那种样子。
 我的童年是快乐的，废话，大部分人现在回头看看自己的童年应该都挺开心的，如果小部分感觉自己小时候不快乐，呵呵，你总有一天会改变这个幼稚的看法吧！童年给我留下印象最深刻的是五六年级时，那时候生活虽质朴，但家庭是给我最富有的财富。每天放学后，可以从书桌上搜集爸爸妈妈买菜找回的零钱放进自己的存钱罐，那清脆的声响是我记忆中最美妙的。待到罐子满了，我就可以拿着我...]]></description><category></category></item><item><title><![CDATA[解决RestTemplate请求返回结果中文乱码??????]]></title><link>https://blog.csdn.net/Forest24/article/details/107458230</link><guid>https://blog.csdn.net/Forest24/article/details/107458230</guid><author>Forest24</author><pubDate>Mon, 20 Jul 2020 10:34:31 +0800</pubDate><description><![CDATA[清除所有messageConverters，由于我项目中使用FastJson解析的，

所以加入FastJsonHttpMessageConverter，

由于FastJsonHttpMessageConverter默认字符集就是UTF8 ，故解决乱码问题。


@Bean
    RestTemplate getRestTemplate() {
        RestTemplate restTemplate = new RestTemplate();
        restTemplate.get]]></description><category></category></item><item><title><![CDATA[Java实现RSA+AES混合加解密]]></title><link>https://blog.csdn.net/Forest24/article/details/107021785</link><guid>https://blog.csdn.net/Forest24/article/details/107021785</guid><author>Forest24</author><pubDate>Mon, 29 Jun 2020 15:49:56 +0800</pubDate><description><![CDATA[import javax.crypto.SecretKey;
import java.security.PrivateKey;
import java.security.PublicKey;

public class EncryptDecryptUtil {

    /**
     * 获取公钥加密后的AES秘钥
     * @param publicKeyStr Base64编码后的公钥
     */
    public static String getPublicEncryptAESKe.]]></description><category></category></item></channel></rss>