<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0"><channel><title>学海拾贝</title><link>https://yonghao.xyz</link><atom:link href="https://yonghao.xyz/rss.xml" rel="self" type="application/rss+xml"/><description>学海拾贝</description><generator>Halo v2.22.14</generator><language>zh-cn</language><lastBuildDate>Mon, 18 May 2026 15:45:18 GMT</lastBuildDate><item><title><![CDATA[MCP（Model Context Protocol）介绍]]></title><link>https://yonghao.xyz/archives/mcp-model-context-protocol-jie-shao</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=MCP%EF%BC%88Model%20Context%20Protocol%EF%BC%89%E4%BB%8B%E7%BB%8D&amp;url=/archives/mcp-model-context-protocol-jie-shao" width="1" height="1" alt="" style="opacity:0;">一、什么是 MCP？ MCP（Model Context Protocol，模型上下文协议） 是一种面向 AI 模型与外部系统之间交互的应用层协议。 它的目标是： 为 AI 模型提供一种标准化、可控、可扩展的方式，用于发现、访问和调用外部能力与上下文。 MCP 并不是某个具体模型或 SDK，而是一套]]></description><guid isPermaLink="false">/archives/mcp-model-context-protocol-jie-shao</guid><dc:creator>皮卡丘</dc:creator><pubDate>Mon, 15 Dec 2025 09:54:51 GMT</pubDate></item><item><title><![CDATA[Freemarker 使用进阶：自定义对象访问]]></title><link>https://yonghao.xyz/archives/freemarker-shi-yong-jin-jie-zi-ding-yi-dui-xiang-fang-wen</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=Freemarker%20%E4%BD%BF%E7%94%A8%E8%BF%9B%E9%98%B6%EF%BC%9A%E8%87%AA%E5%AE%9A%E4%B9%89%E5%AF%B9%E8%B1%A1%E8%AE%BF%E9%97%AE&amp;url=/archives/freemarker-shi-yong-jin-jie-zi-ding-yi-dui-xiang-fang-wen" width="1" height="1" alt="" style="opacity:0;">引言： 在日常使用 Freemarker 作为模板引擎时，我们经常会遇到 null 值、缺失字段、多层嵌套结构、集合判空等问题。尤其是在业务数据不稳定、模板由非技术用户配置的场景中，模板容错能力和渲染健壮性显得尤为重要。 本文是安全地使用 FreeMarker 渲染 JSON 数据续集，将介绍一种增]]></description><guid isPermaLink="false">/archives/freemarker-shi-yong-jin-jie-zi-ding-yi-dui-xiang-fang-wen</guid><dc:creator>皮卡丘</dc:creator><enclosure url="https://yonghao.xyz/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2FChatGPT%2520Image%25202025%25E5%25B9%25B47%25E6%259C%258830%25E6%2597%25A5%252016_01_21.png&amp;size=m" type="image/jpeg" length="724145"/><category>Java</category><pubDate>Wed, 30 Jul 2025 08:02:20 GMT</pubDate></item><item><title><![CDATA[深入理解 logback-spring.xml：Spring Boot 日志配置最佳实践]]></title><link>https://yonghao.xyz/archives/logback-spring.xml</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=%E6%B7%B1%E5%85%A5%E7%90%86%E8%A7%A3%20logback-spring.xml%EF%BC%9ASpring%20Boot%20%E6%97%A5%E5%BF%97%E9%85%8D%E7%BD%AE%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5&amp;url=/archives/logback-spring.xml" width="1" height="1" alt="" style="opacity:0;">深入理解 logback-spring.xml：Spring Boot 日志配置最佳实践 在现代 Java 应用中，日志不仅是排查问题的重要工具，更是运行时监控的关键手段。Spring Boot 默认集成了 Logback 作为日志框架，而 logback-spring.xml 则是进行高级日志配置]]></description><guid isPermaLink="false">/archives/logback-spring.xml</guid><dc:creator>皮卡丘</dc:creator><enclosure url="https://yonghao.xyz/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2FChatGPT%2520Image%25202025%25E5%25B9%25B47%25E6%259C%258823%25E6%2597%25A5%252014_52_03.png&amp;size=m" type="image/jpeg" length="689659"/><category>Java</category><pubDate>Wed, 23 Jul 2025 02:36:26 GMT</pubDate></item><item><title><![CDATA[安全地使用 FreeMarker 渲染 JSON 数据：防止 Null 异常和变量缺失]]></title><link>https://yonghao.xyz/archives/an-quan-di-shi-yong-freemarker-xuan-ran-json-shu-ju-fang-zhi-null-yi-chang-he-bian-liang-que-shi</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=%E5%AE%89%E5%85%A8%E5%9C%B0%E4%BD%BF%E7%94%A8%20FreeMarker%20%E6%B8%B2%E6%9F%93%20JSON%20%E6%95%B0%E6%8D%AE%EF%BC%9A%E9%98%B2%E6%AD%A2%20Null%20%E5%BC%82%E5%B8%B8%E5%92%8C%E5%8F%98%E9%87%8F%E7%BC%BA%E5%A4%B1&amp;url=/archives/an-quan-di-shi-yong-freemarker-xuan-ran-json-shu-ju-fang-zhi-null-yi-chang-he-bian-liang-que-shi" width="1" height="1" alt="" style="opacity:0;">在 Java 开发中，FreeMarker 是一个强大的模板引擎，常用于动态渲染 HTML、邮件模板、文档等。而在一些自动化系统或低代码平台中，FreeMarker 也被用于渲染结构化的 JSON 文本。 但在实际应用中，一个常见的痛点是： 当数据模型中存在 null 或缺失字段时，模板渲染可能抛出]]></description><guid isPermaLink="false">/archives/an-quan-di-shi-yong-freemarker-xuan-ran-json-shu-ju-fang-zhi-null-yi-chang-he-bian-liang-que-shi</guid><dc:creator>皮卡丘</dc:creator><enclosure url="https://yonghao.xyz/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2FChatGPT%2520Image%25202025%25E5%25B9%25B47%25E6%259C%258823%25E6%2597%25A5%252011_52_42.png&amp;size=m" type="image/jpeg" length="1313407"/><pubDate>Sat, 19 Jul 2025 03:53:00 GMT</pubDate></item><item><title><![CDATA[MYSQL中JSON_MERGE和JSON_MERGE_PATCH的区别]]></title><link>https://yonghao.xyz/archives/json_merge-he-json_merge_patch</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=MYSQL%E4%B8%ADJSON_MERGE%E5%92%8CJSON_MERGE_PATCH%E7%9A%84%E5%8C%BA%E5%88%AB&amp;url=/archives/json_merge-he-json_merge_patch" width="1" height="1" alt="" style="opacity:0;">在MySQL中，JSON_MERGE和JSON_MERGE_PATCH是用于处理JSON数据的两个函数，它们的区别主要体现在以下几个方面： 合并方式 JSON_MERGE：将多个JSON值合并为一个JSON值。它会递归地合并对象和数组。对于对象，它会将具有相同键的值合并在一起，如果值也是对象，则进一]]></description><guid isPermaLink="false">/archives/json_merge-he-json_merge_patch</guid><dc:creator>皮卡丘</dc:creator><category>默认分类</category><pubDate>Thu, 27 Feb 2025 07:43:11 GMT</pubDate></item><item><title><![CDATA[📘大模型使用指南]]></title><link>https://yonghao.xyz/archives/agent</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=%F0%9F%93%98%E5%A4%A7%E6%A8%A1%E5%9E%8B%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97&amp;url=/archives/agent" width="1" height="1" alt="" style="opacity:0;">一、什么是大模型？ 大模型（Large Language Model，LLM）是一类基于海量文本训练、拥有数十亿参数的深度学习模型，具备强大的语言理解与生成能力。 常见模型包括： GPT-4（OpenAI） Claude 3（Anthropic） 豆包（字节跳动） DeepSeek（深度求索） 它们]]></description><guid isPermaLink="false">/archives/agent</guid><dc:creator>皮卡丘</dc:creator><enclosure url="https://yonghao.xyz/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2F%25E5%25A4%259A%25E7%25A7%258D%25E8%25A7%2592%25E8%2589%25B2%25E5%258A%259F%25E8%2583%25BD%25E4%25BB%258B%25E7%25BB%258D.png&amp;size=m" type="image/jpeg" length="1357966"/><category>默认分类</category><pubDate>Tue, 25 Feb 2025 12:06:33 GMT</pubDate></item><item><title><![CDATA[在Windows上使用sshuttle的指南]]></title><link>https://yonghao.xyz/archives/zai-windowsshang-shi-yong-sshuttlede-zhi-nan</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=%E5%9C%A8Windows%E4%B8%8A%E4%BD%BF%E7%94%A8sshuttle%E7%9A%84%E6%8C%87%E5%8D%97&amp;url=/archives/zai-windowsshang-shi-yong-sshuttlede-zhi-nan" width="1" height="1" alt="" style="opacity:0;">sshuttle 是一个简单易用的 VPN 代理工具，因其简便的特性深受用户喜爱。现在，sshuttle 终于支持 Windows 平台了。如果你对这个工具感兴趣，可以参考以下步骤在 Windows 上进行安装和使用。 前提条件 安装 Python 环境（本文使用的是 Python 3.12）。如果]]></description><guid isPermaLink="false">/archives/zai-windowsshang-shi-yong-sshuttlede-zhi-nan</guid><dc:creator>皮卡丘</dc:creator><pubDate>Mon, 24 Feb 2025 09:03:19 GMT</pubDate></item><item><title><![CDATA[正则表达式]]></title><link>https://yonghao.xyz/archives/zheng-ze-biao-da-shi</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F&amp;url=/archives/zheng-ze-biao-da-shi" width="1" height="1" alt="" style="opacity:0;">正则密码规则 private static final String PWRegular = "^(?![A-Za-z0-9]+$)[a-zA-Z0-9\\W]{8,}$"; public static final String PWRegular = "^(?![A-Za-z0-9]+$)(?![]]></description><guid isPermaLink="false">/archives/zheng-ze-biao-da-shi</guid><dc:creator>皮卡丘</dc:creator><category>Java</category><pubDate>Tue, 14 Jan 2025 11:30:17 GMT</pubDate></item><item><title><![CDATA[指定pip下载源]]></title><link>https://yonghao.xyz/archives/zhi-ding-pipxia-zai-yuan</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=%E6%8C%87%E5%AE%9Apip%E4%B8%8B%E8%BD%BD%E6%BA%90&amp;url=/archives/zhi-ding-pipxia-zai-yuan" width="1" height="1" alt="" style="opacity:0;">要将pip的全局源设置为华为云，你需要编辑pip的配置文件（pip.conf），这个文件通常位于用户的主目录下的.pip文件夹中（在Windows上可能是%USERPROFILE%\pip\pip.ini，在Unix或Mac OS X上是~/.pip/pip.conf）。如果这个文件或目录不存在，你]]></description><guid isPermaLink="false">/archives/zhi-ding-pipxia-zai-yuan</guid><dc:creator>皮卡丘</dc:creator><category>Python</category><pubDate>Tue, 14 Jan 2025 11:28:25 GMT</pubDate></item><item><title><![CDATA[Linux 命令篇 -wh？]]></title><link>https://yonghao.xyz/archives/linuxming-ling</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=Linux%20%E5%91%BD%E4%BB%A4%E7%AF%87%20-wh%EF%BC%9F&amp;url=/archives/linuxming-ling" width="1" height="1" alt="" style="opacity:0;"># Linux 常用命令介绍：whatis、whereis、which、which.debianutils、while、whiptail、who、whoami 在 Linux 系统中，有许多常用的命令可以帮助我们更高效地进行系统管理和操作。本文将介绍几个常用的 Linux 命令，包括 `whati]]></description><guid isPermaLink="false">/archives/linuxming-ling</guid><dc:creator>皮卡丘</dc:creator><category>Linux</category><pubDate>Fri, 10 Jan 2025 08:51:31 GMT</pubDate></item><item><title><![CDATA[搭建虚拟python环境]]></title><link>https://yonghao.xyz/archives/wei-ming-ming-wen-zhang</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=%E6%90%AD%E5%BB%BA%E8%99%9A%E6%8B%9Fpython%E7%8E%AF%E5%A2%83&amp;url=/archives/wei-ming-ming-wen-zhang" width="1" height="1" alt="" style="opacity:0;"># 安装python sudo apt install python # 创建隔离的python环境 python3 -m venv /home/venv # 激活虚拟环境 source /home/venv/bin/active]]></description><guid isPermaLink="false">/archives/wei-ming-ming-wen-zhang</guid><dc:creator>皮卡丘</dc:creator><category>Python</category><pubDate>Thu, 9 Jan 2025 06:35:00 GMT</pubDate></item><item><title><![CDATA[循环中移除元素注意事项]]></title><link>https://yonghao.xyz/archives/wei-ming-ming-wen-zhang</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=%E5%BE%AA%E7%8E%AF%E4%B8%AD%E7%A7%BB%E9%99%A4%E5%85%83%E7%B4%A0%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9&amp;url=/archives/wei-ming-ming-wen-zhang" width="1" height="1" alt="" style="opacity:0;">不能用增强for循环。 报错ConcurrentModificationException 不报错，但是业务逻辑多半有异常 可以使用普通for循环或者lambda表达式或者iterator表达式。 示例 public class LoopTest { @AllArgsConstructor]]></description><guid isPermaLink="false">/archives/wei-ming-ming-wen-zhang</guid><dc:creator>皮卡丘</dc:creator><category>Java</category><pubDate>Thu, 9 Jan 2025 06:31:27 GMT</pubDate></item><item><title><![CDATA[文件管理]]></title><link>https://yonghao.xyz/archives/wen-jian-guan-li</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=%E6%96%87%E4%BB%B6%E7%AE%A1%E7%90%86&amp;url=/archives/wen-jian-guan-li" width="1" height="1" alt="" style="opacity:0;">DashBoard]]></description><guid isPermaLink="false">/archives/wen-jian-guan-li</guid><dc:creator>皮卡丘</dc:creator><category>默认分类</category><pubDate>Wed, 8 Jan 2025 09:23:20 GMT</pubDate></item><item><title><![CDATA[排查JVM]]></title><link>https://yonghao.xyz/archives/pai-cha-jvm</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=%E6%8E%92%E6%9F%A5JVM&amp;url=/archives/pai-cha-jvm" width="1" height="1" alt="" style="opacity:0;">要生成 .hprof 文件，可以使用以下方法： 1. 使用 JVM 参数生成堆转储 在启动 Java 应用时添加以下 JVM 参数： -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path/to/heapdump.hprof 例如： java]]></description><guid isPermaLink="false">/archives/pai-cha-jvm</guid><dc:creator>皮卡丘</dc:creator><category>Java</category><pubDate>Wed, 8 Jan 2025 08:56:38 GMT</pubDate></item><item><title><![CDATA[Java基础]]></title><link>https://yonghao.xyz/archives/javaji-chu</link><description><![CDATA[<img src="https://yonghao.xyz/plugins/feed/assets/telemetry.gif?title=Java%E5%9F%BA%E7%A1%80&amp;url=/archives/javaji-chu" width="1" height="1" alt="" style="opacity:0;">多线程 同时用100个线程向同一个账户中存1块钱 package org.thread; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.ut]]></description><guid isPermaLink="false">/archives/javaji-chu</guid><dc:creator>皮卡丘</dc:creator><category>Java</category><pubDate>Wed, 8 Jan 2025 08:19:05 GMT</pubDate></item></channel></rss>