<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>技术 on Shellj的博客</title>
    <link>https://im.shellj.com/tags/%E6%8A%80%E6%9C%AF/</link>
    <description>Recent content in 技术 on Shellj的博客</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 22 Jul 2024 10:01:41 +0800</lastBuildDate>
    <atom:link href="https://im.shellj.com/tags/%E6%8A%80%E6%9C%AF/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Font Awesome 图标字体精简方案</title>
      <link>https://im.shellj.com/posts/2023/11/font-thinning/</link>
      <pubDate>Thu, 09 Nov 2023 17:15:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2023/11/font-thinning/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://cdn-sh.shellj.com/202311/aQFafhLKEdfsBOOMY4qb-OIG_clipdrop-enhance-2.jpg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction&lt;/h3&gt;&#xA;&lt;p&gt;在现代网页设计中，图标字体是一个不可或缺的元素。它们不仅可以增添美观，还可以提升用户体验。Font Awesome 是一个流行的图标字体库，提供了丰富的图标选择。然而，大部分网站只会使用其中的一小部分字体，而 Font Awesome 字体文件的大小却有上百KB，因此我们需要对字体进行精简，以增加网站的速度。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Java 枚举使用 Jackson Json 序列化与反序列化</title>
      <link>https://im.shellj.com/posts/2023/11/mastering-java-enum-serialization/</link>
      <pubDate>Fri, 03 Nov 2023 10:36:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2023/11/mastering-java-enum-serialization/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://cdn-sh.shellj.com/202311/ulJVHnRHrONfxgpBgYO8-Mastering-Java-Enum-Serialization.png&#34; alt=&#34;Java 枚举使用 Jackson Json 序列化与反序列化&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;我最近遇到一个问题，Jackson Json 无法正常反序列化枚举类，尽管同一个枚举可以正常序列化。我查阅了一些资料并写下了这篇总结。&lt;/p&gt;</description>
    </item>
    <item>
      <title>使用 winsw 创建 windows 服务</title>
      <link>https://im.shellj.com/posts/2023/07/use-winsw-create-windows-service/</link>
      <pubDate>Mon, 03 Jul 2023 22:21:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2023/07/use-winsw-create-windows-service/</guid>
      <description>&lt;p&gt;在 Windows 系统里有时下载一些exe文件，或者一些 portable 的软件，想把它创建成 Windows 的服务，可以已使用 &lt;a href=&#34;https://github.com/winsw/winsw&#34;&gt;winsw&lt;/a&gt;，使用这个非常简单。&#xA;首先下载 &lt;a href=&#34;https://github.com/winsw/winsw/releases&#34;&gt;winsw&lt;/a&gt;，然后添加进 PATH 里，然后创建一个服务的配置文件，比如下面创建一个 openresty 的服务：&lt;/p&gt;</description>
    </item>
    <item>
      <title>php-fpm getenv 无法获取到系统的环境变量</title>
      <link>https://im.shellj.com/posts/2023/05/php-fpm-getenv-not-working/</link>
      <pubDate>Mon, 08 May 2023 22:20:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2023/05/php-fpm-getenv-not-working/</guid>
      <description>&lt;h2 id=&#34;问题及解决方法&#34;&gt;问题及解决方法&lt;/h2&gt;&#xA;&lt;p&gt;维护的一个 PHP 系统最近多了一个新环境，在部署的时候发现获取不到系统的环境变量，问了一下运维同学，也没什么特别的配置，在网上搜索了一圈，发现这个问题在 nginx + php-fpm 模式下挺普遍的，下面是两种解决方法：&lt;/p&gt;</description>
    </item>
    <item>
      <title>Docker Container Cannot Connect Internet</title>
      <link>https://im.shellj.com/posts/2022/09/docker-container-connot-connect-internet/</link>
      <pubDate>Thu, 29 Sep 2022 22:05:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2022/09/docker-container-connot-connect-internet/</guid>
      <description>&lt;h2 id=&#34;question&#34;&gt;Question&lt;/h2&gt;&#xA;&lt;p&gt;Docker 在禁用修改 iptables 后，导致 Container 无法访问外网(可能是这个原因吧)，如何处理？&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;启用 Docker 的 iptables&lt;/li&gt;&#xA;&lt;li&gt;iptables 手动创建规则禁止 docker 的服务外网访问(但这样每个端口都得手动创建规则)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.csdn.net/qq&#34;&gt;https://blog.csdn.net/qq&lt;/a&gt;_34556414/article/details/108718522 &lt;a href=&#34;https://blog.csdn.net/taiyangdao/article/details/88844558&#34;&gt;https://blog.csdn.net/taiyangdao/article/details/88844558&lt;/a&gt; enable docker iptables and config iptable rules: &lt;a href=&#34;https://juejin.cn/post/6953793101207076871&#34;&gt;https://juejin.cn/post/6953793101207076871&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hugo 渲染原始 HTML</title>
      <link>https://im.shellj.com/posts/2022/05/hugo-with-raw-html/</link>
      <pubDate>Tue, 24 May 2022 22:04:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2022/05/hugo-with-raw-html/</guid>
      <description>&lt;p&gt;使用 Hugo 时有时候需要插入原始的 HTML 代码进行展示，但是 Hugo 会把这些 HTML 过滤掉，HTML 里面的结果是 &lt;code&gt;&amp;lt;!-- raw HTML omitted --&amp;gt;&lt;/code&gt;，这并不是我想要的，查了一下有两种方式可以解决：&lt;/p&gt;</description>
    </item>
    <item>
      <title>IDEA Windows 端口占用问题解决</title>
      <link>https://im.shellj.com/posts/2021/07/idea-windows-port/</link>
      <pubDate>Sat, 17 Jul 2021 21:19:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2021/07/idea-windows-port/</guid>
      <description>&lt;p&gt;Jetbrains IntelliJ IDEA 和全家桶其他软件在 Windows 下端口占用问题解决方法&lt;/p&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;net stop winnat&#xA;netsh int ipv4 set dynamic tcp start=49152 num=16384&#xA;netsh int ipv6 set dynamic tcp start=49152 num=16384&#xA;net start winnat&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Spring Data Jpa 多数据源选择无效</title>
      <link>https://im.shellj.com/posts/2021/06/spring-data-jpa-muti-datasource/</link>
      <pubDate>Fri, 25 Jun 2021 21:17:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2021/06/spring-data-jpa-muti-datasource/</guid>
      <description>&lt;p&gt;有个项目用的 &lt;a href=&#34;https://spring.io/projects/spring-data-jpa&#34;&gt;Spring Data Jpa&lt;/a&gt; ，里面需要多数据源来做分库，正常流程是拦截器拿出用户信息，然后把分库信息设置到 ThreadLocal 里，后面使用就没问题了。但最近遇到个问题，在 Service 层重新分库信息居然没用，依然会使用首次获取到的数据库连接。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Kafka 基础应用</title>
      <link>https://im.shellj.com/posts/2020/11/kafka-knowlage/</link>
      <pubDate>Thu, 19 Nov 2020 21:01:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2020/11/kafka-knowlage/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://cdn-sh.shellj.com/img/202011/kafka-1.jpg&#34; alt=&#34;kafka&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;每个组都保持着一份相同副本&#34;&gt;每个组都保持着一份相同副本&lt;/h2&gt;&#xA;&lt;p&gt;不同组之间互不干扰，互相独立，有几组就有几份数据。&lt;/p&gt;&#xA;&lt;h2 id=&#34;partition-数量小于消费者数量&#34;&gt;partition 数量小于消费者数量&lt;/h2&gt;&#xA;&lt;p&gt;这样会有消费者空闲&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://cdn-sh.shellj.com/img/202011/kafka-2.jpg&#34; alt=&#34;kafka&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;partition-数量大于消费者数量&#34;&gt;partition 数量大于消费者数量&lt;/h2&gt;&#xA;&lt;p&gt;这样会有某个消费者接收多个 partition 的消息&lt;/p&gt;</description>
    </item>
    <item>
      <title>SSL certificate problem: unable to get local issuer certificate 解决方法</title>
      <link>https://im.shellj.com/posts/2020/07/ssl-certificate-problem/</link>
      <pubDate>Thu, 23 Jul 2020 20:53:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2020/07/ssl-certificate-problem/</guid>
      <description>&lt;p&gt;最近在一台 Ubuntu 上使用 curl 时报错，比如下面:&lt;/p&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;curl https://api.shellj.com/ip/1.1.1.1&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;curl: (60) SSL certificate problem: unable to get local issuer certificate&#xA;More details here: https://curl.haxx.se/docs/sslcerts.html&#xA;&#xA;curl failed to verify the legitimacy of the server and therefore could not&#xA;establish a secure connection to it. To learn more about this situation and&#xA;how to fix it, please visit the web page mentioned above.&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;&lt;strong&gt;更新：先检查是不是 nginx 证书配置错误了, 证书链不完整，可以在 &lt;a href=&#34;https://myssl.com/&#34;&gt;https://myssl.com/&lt;/a&gt; 检查一下，如果不完整，下载下来配置上就好了。&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>WordPress 安装后必要的插件</title>
      <link>https://im.shellj.com/posts/2020/05/wordpress-init/</link>
      <pubDate>Tue, 26 May 2020 20:43:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2020/05/wordpress-init/</guid>
      <description>&lt;p&gt;在国内的服务器安装了 WordPress 后最先做的事情应该是把连接到 WordPress 服务器的网络解决下，有两款插件可以满足需求。&lt;/p&gt;&#xA;&lt;h3 id=&#34;wp-china-yes&#34;&gt;WP-China-Yes&lt;/h3&gt;&#xA;&lt;p&gt;这款插件解决了 WordPress 升级，安装主题，安装插件出现的一些网络错误，比如常见的 &lt;code&gt;429 Too Many Requests 错误&lt;/code&gt;。基于反向代理技术，而且免费，开源。&lt;/p&gt;</description>
    </item>
    <item>
      <title>服务器配置如何选择</title>
      <link>https://im.shellj.com/posts/2020/04/qps-calculate/</link>
      <pubDate>Tue, 28 Apr 2020 20:33:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2020/04/qps-calculate/</guid>
      <description>&lt;p&gt;在 v2ex 上看到一个关于并发的帖子，&lt;strong&gt;&lt;a href=&#34;https://v2ex.com/t/666761&#34;&gt;峰值 5000 并发量的服务器需要什么配置比较合理&lt;/a&gt;&lt;/strong&gt;，自己也来算算到底什么配置比较合适。&lt;/p&gt;&#xA;&lt;p&gt;先来看看一楼说的对不对:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;2 核 8G 单台 4M 带宽就足够了。适当的把文件存储到 oss 。&lt;/p&gt;</description>
    </item>
    <item>
      <title>使用 git –orphan 清理git历史</title>
      <link>https://im.shellj.com/posts/2020/04/clean-git-history/</link>
      <pubDate>Tue, 14 Apr 2020 20:29:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2020/04/clean-git-history/</guid>
      <description>&lt;p&gt;git 使用一段时间后 .git 文件夹会非常大，尤其是提交了大文件，当把大文件删除后，仓库大小依旧不变小。这里使用 &lt;code&gt;git checkout --orphan branch_name&lt;/code&gt; 把 git 的所有 commit 记录清理掉来缩减仓库，相当于重建一个新的仓库了。如果在意历史记录的话这个方法就不太适用了。&lt;/p&gt;</description>
    </item>
    <item>
      <title>maven获取不到jar包</title>
      <link>https://im.shellj.com/posts/2019/09/maven-could-not-resolve-dependencies-solution/</link>
      <pubDate>Thu, 12 Sep 2019 14:01:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2019/09/maven-could-not-resolve-dependencies-solution/</guid>
      <description>&lt;p&gt;今天遇到一个 maven 的问题，构建一个项目的时候忘记把一个依赖的 jar 包发布到仓库，然后构建失败，问题在于把依赖的 jar 包发布到仓库后还是构建失败，说无法获取到 jar 包，报的错误如下:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rust 开发环境配置</title>
      <link>https://im.shellj.com/posts/2019/09/rust-development-environment-setting/</link>
      <pubDate>Thu, 12 Sep 2019 13:59:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2019/09/rust-development-environment-setting/</guid>
      <description>&lt;h2 id=&#34;指定安装位置&#34;&gt;指定安装位置&lt;/h2&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#这个也可以不指定，选择默认安装位置。&#xA;export RUST_HOME=/some/path&#xA;export CARGO_HOME=/some/path&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;rustup-安装&#34;&gt;rustup 安装&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;第一次安装 rustup 的时候，如果按照官网教程 &lt;a href=&#34;https://sh.rustup.rs/&#34;&gt;https://sh.rustup.rs&lt;/a&gt; 链接无法下载，可以通过 &lt;a href=&#34;https://cdn.jsdelivr.net/gh/rust-lang-nursery/rustup.rs/rustup-init.sh&#34;&gt;jsdelivr&lt;/a&gt; 下载 rustup-init.sh， 然后把脚本中的 RUSTUP_UPDATE_ROOT 变量改为 &lt;a href=&#34;https://mirrors.ustc.edu.cn/rust-static/rustup%E3%80%82&#34;&gt;https://mirrors.ustc.edu.cn/rust-static/rustup。&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static&#xA;export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;cargo&#34;&gt;cargo&lt;/h2&gt;&#xA;&lt;p&gt;默认位置: &lt;code&gt;$HOME/.cargo/config&lt;/code&gt;&lt;br&gt;&#xA;如果配置了&lt;strong&gt;CARGO_HOME&lt;/strong&gt; 就是 &lt;strong&gt;$CARGO_HOME/config&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mysql Communications link failure 的几种情况</title>
      <link>https://im.shellj.com/posts/2019/06/mysql-communications-link-failure/</link>
      <pubDate>Fri, 14 Jun 2019 22:54:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2019/06/mysql-communications-link-failure/</guid>
      <description>&lt;h2 id=&#34;问题&#34;&gt;问题&lt;/h2&gt;&#xA;&lt;p&gt;一个批量导数据的程序，加了一张表的导入后，有时会出现 &lt;strong&gt;com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure&lt;/strong&gt; 错误，这个错误在网上非常常见。&lt;/p&gt;&#xA;&lt;h2 id=&#34;问题排查&#34;&gt;问题排查&lt;/h2&gt;&#xA;&lt;p&gt;在网上搜索了一遍后，大多数方案说的原因都是一个数据库链接空闲时间太长了，导致被关闭掉了，而我的这个程序不是这种情况，因为导数据都是不断的在执行，链接不太可能会空闲，这个解决方案明显不符合我的情况，然后在网上看到一篇博客，说是因为批量插入的数据太多，导致超时，这个应该差不多，然后写了代码测试了一下，几万条数据批量插入的时候就会超时报错了。&lt;/p&gt;</description>
    </item>
    <item>
      <title>ffmpeg视频截取，ffmpeg音频截取</title>
      <link>https://im.shellj.com/posts/2019/06/awesome-ffmpeg/</link>
      <pubDate>Sat, 01 Jun 2019 22:53:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2019/06/awesome-ffmpeg/</guid>
      <description>&lt;h2 id=&#34;ffmpeg截取音频&#34;&gt;ffmpeg截取音频&lt;/h2&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ffmpeg -i source.mp3 -ss 00:01:12 -t 00:01:42 -acodec copy out.mp3&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;参数 说明&lt;/p&gt;&#xA;&lt;p&gt;|&#xA;|  |&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;&lt;/th&gt;&#xA;          &lt;th&gt;&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;-ss&lt;/td&gt;&#xA;          &lt;td&gt;开始位置：00:01:12&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;-t&lt;/td&gt;&#xA;          &lt;td&gt;结束位置：00:01:42&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;ffmpeg截取视频&#34;&gt;ffmpeg截取视频&lt;/h2&gt;&#xA;&lt;p&gt;注意保持下面参数的顺序，可以更快的截取&lt;/p&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ffmpeg -ss 00:44:02 -i source.mp4 -strict -2 -t 00:04:06 -c:v copy -c:a copy out.mp4&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.csdn.net/xuejianbest/article/details/84774136&#34;&gt;https://blog.csdn.net/xuejianbest/article/details/84774136&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Alacritty中文乱码问题</title>
      <link>https://im.shellj.com/posts/2019/04/alacritty/</link>
      <pubDate>Tue, 23 Apr 2019 23:17:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2019/04/alacritty/</guid>
      <description>&lt;h2 id=&#34;问题&#34;&gt;问题&lt;/h2&gt;&#xA;&lt;p&gt;最近在用一款名为 &lt;a href=&#34;https://github.com/jwilm/alacritty&#34;&gt;Alacritty&lt;/a&gt; 的终端，但在MAC上安装后中文和一些emoji一直乱码，在网上搜索没有结果，今天用ssh连到一台远程的机器上中文却显示出来了，看来是和终端的环境配置有关。&lt;/p&gt;</description>
    </item>
    <item>
      <title>rustlang学习</title>
      <link>https://im.shellj.com/posts/2019/04/rustlang-learning/</link>
      <pubDate>Mon, 01 Apr 2019 10:01:41 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2019/04/rustlang-learning/</guid>
      <description>&lt;p&gt;下午按着 &lt;a href=&#34;https://github.com/rust-lang/rustlings&#34;&gt;rustlings&lt;/a&gt; 练习了一下 &lt;a href=&#34;https://github.com/rust-lang/rust&#34;&gt;rust&lt;/a&gt; ，比较友好的一个学习工具。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Maven项目配置了repository未生效</title>
      <link>https://im.shellj.com/posts/2019/03/maven-repo-invalid/</link>
      <pubDate>Wed, 13 Mar 2019 22:00:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2019/03/maven-repo-invalid/</guid>
      <description>&lt;p&gt;maven 可以从多个地方配置仓库，比如项目里面的 pom.xml 里面的 repository 和 profile，全局 settings.xml 里面的 mirror。但今天在项目里配置了仓库，但未生效，无法获取 jar，网上搜索一般优先级是项目里的比较高，所以不会存在什么问题，配置如下&lt;/p&gt;</description>
    </item>
    <item>
      <title>Eureka常用操作</title>
      <link>https://im.shellj.com/posts/2019/02/eureka/</link>
      <pubDate>Thu, 28 Feb 2019 12:27:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2019/02/eureka/</guid>
      <description>&lt;h2 id=&#34;从-eureka-服务器删除-instance&#34;&gt;从 Eureka 服务器删除 Instance&lt;/h2&gt;&#xA;&lt;h3 id=&#34;旧版&#34;&gt;旧版:&lt;/h3&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;DELETE /eureka/apps/{appID}/{instanceID}&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;例如：&lt;code&gt;DELETE /eureka/apps/TRANSACTION/172.28.20.155:transaction:50041&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;新版&#34;&gt;新版:&lt;/h3&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;DELETE /eureka/v2/apps/{appID}/{instanceID}&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;例如: &lt;code&gt;DELETE /eureka/v2/apps/TRANSACTION/172.28.20.155:transaction:50041&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;上面这两个操作可以移除 instance，但是如果 instance 继续发送连接信息，又会重新注册上的，所以这个一般用于踢掉挂掉的 instance 吧。&lt;/p&gt;</description>
    </item>
    <item>
      <title>ElasticSearch数组多个值匹配</title>
      <link>https://im.shellj.com/posts/2019/02/elasticsearch/</link>
      <pubDate>Tue, 26 Feb 2019 18:20:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2019/02/elasticsearch/</guid>
      <description>&lt;p&gt;比如ES里有一个字段是的值为:&lt;/p&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;span class=&#34;code-block__lang&#34;&gt;json&lt;/span&gt;&#xA;  &#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;tags&amp;#34;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;希望搜索 [2, 3, 4] 得到这条数据，tags 里必须有 2, 3, 4 这几个值，使用 termsQuery 似乎是包含一个值就能搜索出来。可以使用多个 term query 搜索，每个条件一个值，就可以得到想要的效果了，例如下面的搜索：&lt;/p&gt;</description>
    </item>
    <item>
      <title>Xshell双击选中单词会中断tail -f持续跟踪日志</title>
      <link>https://im.shellj.com/posts/2018/11/xshelltail-f/</link>
      <pubDate>Thu, 08 Nov 2018 01:02:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2018/11/xshelltail-f/</guid>
      <description>&lt;h2 id=&#34;问题&#34;&gt;问题&lt;/h2&gt;&#xA;&lt;p&gt;Xshell看日志的时候双击准备复制某个单词，会中断被 tail -f 持续跟踪的日志，退出 tail -f。&lt;/p&gt;&#xA;&lt;h2 id=&#34;原因及解决方法&#34;&gt;原因及解决方法&lt;/h2&gt;&#xA;&lt;p&gt;原因是开启了微软词典的划译功能，调用了系统的Ctrl+C，选中某个单词会同时发送Ctrl+C事件，导致结束日志的持续跟踪。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Spring Cloud Stream 初尝</title>
      <link>https://im.shellj.com/posts/2018/07/spring-cloud-stream/</link>
      <pubDate>Mon, 02 Jul 2018 21:08:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2018/07/spring-cloud-stream/</guid>
      <description>&lt;p&gt;公司里目前用的是RocketMQ，用的过程中遇到一些问题，逐渐将一些业务转到 &lt;a href=&#34;https://kafka.apache.org/&#34;&gt;kafka&lt;/a&gt; 上，正好目前项目是spring boot项目，所以就来试试 spring cloud stream，本地环境有 rabbitmq，所以使用它了。&lt;/p&gt;</description>
    </item>
    <item>
      <title>spring transaction不生效的一些原因</title>
      <link>https://im.shellj.com/posts/2017/05/spring-transaction/</link>
      <pubDate>Mon, 15 May 2017 14:57:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2017/05/spring-transaction/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://i.loli.net/2018/06/30/5b3704afebe2d.jpg&#34; alt=&#34;DSC_3900&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;同一个类中一个方法调用的另一个有事务的方法&#34;&gt;同一个类中一个方法调用的另一个有事务的方法&lt;/h3&gt;&#xA;&lt;p&gt;在spring的声明式注解中，如果直接调用的方法不包含&lt;code&gt;Transactional&lt;/code&gt;注解，那么即使这个方法里面调用的其他方法包含注解，那么事务也是不会生效的，例如下面的这段代码：&lt;/p&gt;</description>
    </item>
    <item>
      <title>mycat事务超时</title>
      <link>https://im.shellj.com/posts/2017/05/mycat-transation-timeout/</link>
      <pubDate>Wed, 03 May 2017 23:30:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2017/05/mycat-transation-timeout/</guid>
      <description>&lt;h4 id=&#34;问题&#34;&gt;问题&lt;/h4&gt;&#xA;&lt;p&gt;项目里面使用的是&lt;a href=&#34;http://mycat.io/&#34;&gt;mycat&lt;/a&gt;进行分库分表，但在最近一个系统更新后出现数据库事务锁超时的问题，如下面的错误:&lt;/p&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h4 id=&#34;分析&#34;&gt;分析&lt;/h4&gt;&#xA;&lt;p&gt;先在网上搜索了一下之后，发现大多数说的都不是什么好的解决方案，手动kill掉事务，把事务超时时间加长，这些对我现在这个项目都不实际，还是自己分析吧。&lt;br&gt;&#xA;对数据库的配置检查了一番，没什么问题，并没有什么更新，然后就对程序进行分析，这个错误是在一次系统更新后才出现的，对这次更新进行了分析，发现频繁超时的那个更新操作去掉了一个分片id参数，比如之前是这样：&lt;/p&gt;</description>
    </item>
    <item>
      <title>爱极笔记: Blogger添加语法高亮</title>
      <link>https://im.shellj.com/posts/2013/03/blogger/</link>
      <pubDate>Wed, 27 Mar 2013 11:49:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2013/03/blogger/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://igeekpro.blogspot.com/2013/02/Blogger-SyntaxHighlighter.html?spref=bl&#34;&gt;爱极笔记: Blogger添加语法高亮&lt;/a&gt;: 该Blogger之前曾经添加过语法高亮，今天发现了一个Blogger高亮脚本生成器，快捷好用。试用了一下，推荐。 高亮脚本生成器地址： &lt;a href=&#34;http://www.way2blogging.org/widget-generators/syntax-highlighter-script&#34;&gt;http://www.way2blogging.org/widget-generators/syntax-highlighter-script&lt;/a&gt;&amp;hellip;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
