-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.xml
228 lines (228 loc) · 31.1 KB
/
index.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Yulin Lewis' Blog</title><link>https://lewky.cn/</link><description>不想当写手的码农不是好咸鱼_(xз」∠)_</description><generator>Hugo -- gohugo.io</generator><managingEditor>1019175915@qq.com (雨临Lewis)</managingEditor><webMaster>1019175915@qq.com (雨临Lewis)</webMaster><copyright>This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</copyright><lastBuildDate>Thu, 06 Mar 2025 23:52:35 +0800</lastBuildDate><atom:link href="https://lewky.cn/index.xml" rel="self" type="application/rss+xml"/><item><title>cron表达式</title><link>https://lewky.cn/posts/cron/</link><pubDate>Thu, 06 Mar 2025 23:52:35 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/cron/</guid><description><![CDATA[<h2 id="cron表达式">cron表达式</h2>
<p>包含6或7个参数,代表不同的时间单位和取值范围:</p>
<ul>
<li>秒(0-59)</li>
<li>分(0-59)</li>
<li>时(0-23)</li>
<li>日(1-31)</li>
<li>月(1-12 或 JAN-DEC)</li>
<li>星期几(0-6 或 SUN-SAT)</li>
<li>年(可选,1970-2099)</li>
</ul>
<p>其中日和星期几一般不同时指定值,因为可能会冲突,一个指定值后另一个会用<code>?</code>来表示忽略,即不指定具体值。</p>]]></description></item><item><title>cmd - 常用命令</title><link>https://lewky.cn/posts/cmd-commands/</link><pubDate>Mon, 03 Feb 2025 21:28:39 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/cmd-commands/</guid><description><h2 id="常用命令">常用命令</h2></description></item><item><title>Eureka问题汇总</title><link>https://lewky.cn/posts/eureka-issues/</link><pubDate>Thu, 09 Jan 2025 17:29:20 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/eureka-issues/</guid><description><![CDATA[<h2 id="eureka心跳续约一直失败">Eureka心跳续约一直失败</h2>
<p>由于服务端配置了30s无心跳则剔除注册的服务,当客户端由于网络波动等原因在一定时间内一直心跳失败时,就会出现一种很奇怪的现象:</p>
<p>服务端上注册的服务状态一直在上线、下线之间跳动,并且该服务一会消失、一会出现,此时客户端直接执行注册、上线、下线脚本都是正常的,观察日志会发现只有心跳一直失败,且心跳由最初配置的10s一次变成了100s一次,这个客户端服务在服务端的注册状态一直处于不稳定状态。</p>]]></description></item><item><title>Excel常见用法</title><link>https://lewky.cn/posts/excel-skill/</link><pubDate>Mon, 16 Dec 2024 23:04:22 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/excel-skill/</guid><description><![CDATA[<h2 id="函数公式使用技巧">函数(公式)使用技巧</h2>
<ul>
<li>可以在单元格的上方输入<code>=</code>来使用函数完成一些特殊的操作,比如用<code>&</code>拼接字符串、运算、调用Exce1提供的函数等。</li>
<li>用<code>&</code>和<code>CHAR(10)</code>可以拼接换行符:<code>=A1 & CHAR(10) & "HelloWorld"</code>。</li>
<li>单元格的公式在输入完毕后即可生效,可以通过拖动右下角来快速复制公式到其他单元格,但是在拖动的时候公式里的数据范国会自适应变动,如果不希望变动,可以通过<code>$</code>固定范围,将原本的相对引用切换为绝对引用。<code>$A</code>表示固定第A列,<code>$1</code>表示固定第1行,<code>$A$1</code>表示固定第A列1行。</li>
<li>按<code>Ctrl + Shift + ↓</code>会直接选中当前单元格到下一个空白格之前的单元格,可以用来快速选定一列数据,再按两次该组合健会继续向下选中同一列的后续单元格。</li>
</ul>]]></description></item><item><title>shell脚本常用语法</title><link>https://lewky.cn/posts/shell/</link><pubDate>Mon, 25 Nov 2024 00:09:52 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/shell/</guid><description><h2 id="常用语法">常用语法</h2></description></item><item><title>Linux常用命令</title><link>https://lewky.cn/posts/linux-commands/</link><pubDate>Sun, 13 Oct 2024 21:28:39 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/linux-commands/</guid><description><h2 id="常用命令">常用命令</h2></description></item><item><title>别了,向晚</title><link>https://lewky.cn/posts/asoul-ava/</link><pubDate>Fri, 19 Apr 2024 23:51:27 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/asoul-ava/</guid><description><![CDATA[<h2 id="深海与月光">深海与月光</h2>
<p>耳边似乎还回响着水母之歌的旋律,笨拙的水母退场离开了舞台,顶碗人也不会忘记深海里曾经的那一束白月光。</p>
<p>别了,向晚。</p>]]></description></item><item><title>必胜客自助餐</title><link>https://lewky.cn/posts/bishengke/</link><pubDate>Sun, 24 Mar 2024 12:42:30 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/bishengke/</guid><description><![CDATA[<h2 id="攻略">攻略</h2>
<ol>
<li>可以提前说不要配菜</li>
<li>披萨可以论角上,口味还可以,推荐榴莲披萨、乳酪大会、超级至尊。</li>
<li>意面之类的,类似于热干面换成了意面</li>
<li>惠灵顿牛排,份量挺大的,没体验过的可以点一份多人一起吃</li>
<li>雪糕黑天使、草莓天使,其实就是可乐上面加奶油和冰淇淋</li>
<li>肋眼、西冷牛排,肋眼口感更好,适合点来冲单价,不过品质一般,不太推荐。牛排可以提前说不要配菜。</li>
<li>鸡块,相当于大号鸡米花,可以点</li>
<li>凤尾虾,必点</li>
<li>雪域,奶油蛋糕,还有抹茶口味,招牌甜品,喜欢甜品的必点</li>
<li>鱿鱼圈,一般</li>
<li>小龙虾麻辣口味优于咸蛋黄口味,要注意有没有开背,没开背不建议点。另外小龙虾底下会有通心粉,可以提前说不要加通心粉。好吃可点。</li>
<li>脆皮虾,好吃可点。</li>
<li>卡曼橘,饮品,还行。</li>
</ol>]]></description></item><item><title>Prometheus简易入门</title><link>https://lewky.cn/posts/prometheus-start/</link><pubDate>Mon, 06 Nov 2023 23:13:18 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/prometheus-start/</guid><description><![CDATA[<h2 id="前言">前言</h2>
<p>APM系统即Application Performance Management应用性能管理,目的是对企业的关键业务系统进行实时性能监控和故障管理,主要有以下三个维度:日志聚合Logs、业务指标Metrics、链路跟踪Traces。</p>
<p>在现今很流行的分布式架构微服务系统中,主流的APM系统组件:日志聚合可以使用ELK Stack,业务指标采用Prometheus,链路跟踪使用SkyWalking。比如新时代的银行业务系统需要上云,日志往往采用云服务商提供的日志聚合平台(如阿里云的SLS、腾讯云的CLS)。</p>]]></description></item><item><title>Chrome问题汇总</title><link>https://lewky.cn/posts/chrome-issues/</link><pubDate>Tue, 25 Jul 2023 21:18:37 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/chrome-issues/</guid><description><h2 id="无法保存密码">无法保存密码</h2>
<p>在升级Chrome后原本正常的保存密码功能忽然失效,此时就算手动添加、导入密码都无法成功保存密码,暂不清楚原因,但有以下方式可以解决该问题:</p></description></item><item><title>SSH命令问题汇总</title><link>https://lewky.cn/posts/ssh-issues/</link><pubDate>Tue, 20 Jun 2023 13:11:18 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/ssh-issues/</guid><description><![CDATA[<h2 id="no-matching-host-key-type-found-their-offer-ssh-dss">no matching host key type found. Their offer: ssh-dss</h2>
<p>使用SSH登录时报错如下:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">Unable to negotiate with 20.1.1.174 port 22: no matching host key type found. Their offer: ssh-dss
</span></span></code></pre></td></tr></table>
</div>
</div>]]></description></item><item><title>PGP加解密</title><link>https://lewky.cn/posts/pgp/</link><pubDate>Fri, 16 Jun 2023 00:19:39 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/pgp/</guid><description><![CDATA[<h2 id="pgp和gpg">PGP和GPG</h2>
<p>对接客户需求时对方使用PGP对文件进行加解密,但PGP是商用的非对称加解密方式,可以改用Apache基金会推出的开源的GPG,两者的加解密可以无缝对接。</p>
<p>Linux通常自带GPG命令,可以直接使用。</p>]]></description></item><item><title>Apollo问题汇总</title><link>https://lewky.cn/posts/apollo-issues/</link><pubDate>Tue, 09 May 2023 17:29:20 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/apollo-issues/</guid><description><![CDATA[<h2 id="apollo简介">Apollo简介</h2>
<p>Apollo作为分布式配置中心,主要分为三个部分:客户端Client、服务端Server、管理门户Portal。Portal提供Web界面供用户管理配置。</p>
<p>Apollo涉及到3个进程,启动时需要按照configservice、adminservice、portal的顺序。</p>]]></description></item><item><title>GitHub问题汇总</title><link>https://lewky.cn/posts/github-issues/</link><pubDate>Thu, 13 Apr 2023 00:27:01 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/github-issues/</guid><description><![CDATA[<h2 id="推送时报错秘钥格式不支持">推送时报错秘钥格式不支持</h2>
<p>GitHub在某次更新后改变了支持的秘钥策略,对于新增的RSA格式的SSH秘钥,如果是无密码加密的,会报错如下:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">You're using an RSA key with SHA-1, which is no longer allowed. Please use a
</span></span></code></pre></td></tr></table>
</div>
</div><p>GitHub的改动详情可以参考如下页面:https://github.blog/2021-09-01-improving-git-protocol-security-github/</p>
<blockquote>
<p>We’re changing which keys are supported in SSH and removing unencrypted Git protocol. Specifically we are:</p>
<ul>
<li>Removing support for all DSA keys</li>
<li>Adding requirements for newly added RSA keys</li>
<li>Removing some legacy SSH algorithms (HMAC-SHA-1 and CBC ciphers)</li>
<li>Adding ECDSA and Ed25519 host keys for SSH</li>
<li>Turning off the unencrypted Git protocol</li>
</ul>
</blockquote>]]></description></item><item><title>SmartGit问题汇总</title><link>https://lewky.cn/posts/smartgit-issues/</link><pubDate>Wed, 12 Apr 2023 22:27:41 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/smartgit-issues/</guid><description><![CDATA[<h2 id="30天试用期到期解决方法">30天试用期到期解决方法</h2>
<p>SmartGit可以免费试用三十天,三十天后可以通过删除配置文件来重复免费试用三十天的过程,不同版本需要删除的文件不同。</p>
<p><code>win + R</code>组合键打开运行窗口,输入<code>%APPDATA%\syntevo\SmartGit\</code>然后回车会进入到SmartGit的安装路径,进入你当前使用的版本目录,如果是旧版的SmartGit(如17.2版本),删除当前的<code>settings.xml</code>文件,然后重启SmartGit即可。</p>
<p>如果找不到<code>settings.xml</code>文件,说明是新版本的SmartGit(如21.2版本),此时需要删除下面两个文件:</p>
<p><code>license</code>和<code>preferences.yml</code>,然后重启SmartGit即可。</p>
<h2 id="选择秘钥时不支持openssh格式">选择秘钥时不支持OPENSSH格式</h2>
<p>某天发现用Git Bash生成的SSH key无法被SmartGit识别,提示需要PEM格式,不支持OPENSSH格式。奇怪的是之前也用同样的方法生成的key是可以被识别的,猜测要么是SmartGit版本不同导致无法支持OPENSSH格式,要么是Git Bash版本不同导致默认生成的key格式发生了变化。</p>]]></description></item><item><title>HttpClient问题汇总</title><link>https://lewky.cn/posts/httpclient-issues/</link><pubDate>Sun, 20 Nov 2022 23:13:22 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/httpclient-issues/</guid><description><h2 id="httpurlconnection设置host请求头无效">HttpURLConnection设置host请求头无效</h2>
<p>由于业务需要在调用第三方SDK时需要设置host请求头为对方的域名,在测试时发现代码设置后依然无法生效。查找资料后发现是从JDK6的6u23版本开始就对HTTP的部分请求头做了限制,如下:</p></description></item><item><title>Oculus Quest2食用指南</title><link>https://lewky.cn/posts/oculus-quests/</link><pubDate>Thu, 25 Aug 2022 21:20:01 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/oculus-quests/</guid><description><![CDATA[<h2 id="前言">前言</h2>
<p>前不久买了Oculus Quest2,从购买到激活再到使用这个过程属实折腾了好一番手脚,这里简单记录下,一方面给其他朋友做个参考,一方面也能以防万一日后重置机器需要重新激活。</p>
<h2 id="设备本体">设备本体</h2>
<p>Oculus Quest2目前分为两种配置,一种内存128G,一种内存256G,通常128G就够用了,一般玩过的游戏、看过的电影删了就行,基本不会内存不够用。当然土豪也可以直接上256G。</p>
<p>Quest2从2022年8月起涨价了几百块,但总体来说依然性价比极高,且买后激活的15天内会免费赠送节奏光剑游戏(原价40美金),需要在Oculus app的邮箱通知里领取,过期作废,别忘记领取了。</p>
<p>推荐从京东国际网购,并不会比亚马逊贵多少,并且发货速度比亚马逊快起码半个月时间。需要注意的是,Quest2的质保针对的是头显,并不包括手柄,如果手柄坏了只能找客服付费维修。</p>
<p>头戴有配套的充电器充电,手柄则是使用的七号电池,设备开箱后按照说明书去掉一些保护膜即可使用,建议到手后立刻充电。</p>]]></description></item><item><title>背包英雄:匕首流无尽模式详细攻略</title><link>https://lewky.cn/posts/backpack-hero-dagger/</link><pubDate>Sun, 03 Jul 2022 16:26:14 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/backpack-hero-dagger/</guid><description><![CDATA[<h2 id="前言">前言</h2>
<p>自从看了老菊的背包英雄视频后,最近几周都痴迷于这款体量虽小但却很精品的肉鸽页游。各种套路组合挺多,机制也有意思,引入了常规肉鸽里不存在的背包空间限制,对于build的构建很有挑战。加上通关后还有个无尽模式,一直在尝试无尽模式能打到多远。今天通关了无尽,记录下攻略,也不算白白浪费了这段时间的努力。</p>
<p>这是游戏的<a href="https://thejaspel.itch.io/backpack-hero" target="_blank" rel="noopener noreffer">官方地址</a>,官方自带中文翻译,如果访问不了的也可以去<a href="https://www.mhhf.com/game/detail/5739" target="_blank" rel="noopener noreffer">灵动游戏</a>上玩。</p>]]></description></item><item><title>Linux问题汇总</title><link>https://lewky.cn/posts/linux-issues/</link><pubDate>Thu, 23 Jun 2022 00:44:25 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/linux-issues/</guid><description><![CDATA[<h2 id="bad-interpreter-no-such-file-or-directory">bad interpreter: No such file or directory</h2>
<p>在Windows环境下用Notepad++写了个shell脚本,上传到Linux平台后运行报错如下:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">/bin/sh^M: bad interpreter: No such file or directory
</span></span></code></pre></td></tr></table>
</div>
</div>]]></description></item><item><title>Postman问题汇总</title><link>https://lewky.cn/posts/postman-issues/</link><pubDate>Tue, 07 Jun 2022 23:49:08 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/postman-issues/</guid><description><![CDATA[<h2 id="无法更改请求报文的编码">无法更改请求报文的编码</h2>
<p>在测试接口的时候发现,在Header中用<code>Content-type</code>指定编码为<code>GBK</code>也没有效果,服务端收到的报文始终是<code>UTF-8</code>编码的字节数组。在查阅资料后得出结论,就是Postman限制死了请求报文的编码为<code>UTF-8</code>,无法通过配置等方式进行修改,如果需要使用其他编码,要么换其他HTTP工具,要么用Java写一段代码去测试接口。</p>]]></description></item><item><title>别了,珈乐</title><link>https://lewky.cn/posts/asoul-jiale/</link><pubDate>Wed, 11 May 2022 23:30:34 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/asoul-jiale/</guid><description><![CDATA[<h2 id="江湖路远有缘再见">江湖路远,有缘再见</h2>
<p>感谢这一路走来的欢笑与感动,东北的小狼公主提前离开了城堡,皇家骑士们依然守候在身后。</p>
<p>别了,珈乐。</p>]]></description></item><item><title>桌面窗口管理器占用内存过高</title><link>https://lewky.cn/posts/dwm-issues/</link><pubDate>Tue, 22 Mar 2022 08:20:42 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/dwm-issues/</guid><description><h2 id="桌面窗口管理器dwmexe内存泄漏">桌面窗口管理器(dwm.exe)内存泄漏</h2>
<p>自从某天更新了Intel的核显驱动后,就发现电脑开机一段时间后必然发生卡顿,后来发现每次卡顿都是桌面窗口管理器(dwm.exe)占用内存过高。观察一段时间后发现,该进程内存会无限增加,怀疑发生了内存泄漏。在知乎搜索后发现很多人遇到了同款问题,这里记录下解决方法。</p></description></item><item><title>ELK系列(6) - Elasticsearch常用接口</title><link>https://lewky.cn/posts/elk-6/</link><pubDate>Mon, 21 Mar 2022 08:38:01 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/elk-6/</guid><description><![CDATA[<h2 id="创建索引">创建索引</h2>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">// 创建blog索引,类型是_doc,id是1
</span></span><span class="line"><span class="cl">curl -H 'Content-Type:application/json' -XPUT http://localhost:9200/blog/_doc/1 -d '
</span></span><span class="line"><span class="cl">{
</span></span><span class="line"><span class="cl"> "id": "1",
</span></span><span class="line"><span class="cl"> "title": "New version of Elasticsearch released!",
</span></span><span class="line"><span class="cl"> "content": "Version 1.0 released today!",
</span></span><span class="line"><span class="cl"> "priority": 10,
</span></span><span class="line"><span class="cl"> "tags": ["announce", "elasticsearch", "release"]
</span></span><span class="line"><span class="cl">}'
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">// 创建blog索引,类型是_doc,id由ES自己生成
</span></span><span class="line"><span class="cl">// 该id长度为20个字符,URL安全,base64编码,GUID,分布式系统并行生成时不可能会发生冲突
</span></span><span class="line"><span class="cl">curl -H 'Content-Type:application/json' -XPOST http://localhost:9200/blog/_doc/ -d '
</span></span><span class="line"><span class="cl">{
</span></span><span class="line"><span class="cl"> "title": "New version of Elasticsearch released!",
</span></span><span class="line"><span class="cl"> "content": "Version 1.0 released today!",
</span></span><span class="line"><span class="cl"> "priority": 10,
</span></span><span class="line"><span class="cl"> "tags": ["announce", "elasticsearch", "release"]
</span></span><span class="line"><span class="cl">}'
</span></span></code></pre></td></tr></table>
</div>
</div>]]></description></item><item><title>ELK系列(5) - Elasticsearch性能调优</title><link>https://lewky.cn/posts/elk-5/</link><pubDate>Sat, 19 Mar 2022 22:27:05 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/elk-5/</guid><description><![CDATA[<h2 id="机器内存分配">机器内存分配</h2>
<p>官方推荐一个ES节点最好是分配当前机器最大内存的50%,比如机器内存是16g,就分配8g给ES:<code>-Xmx8g</code>。</p>
<p>剩下的8g内存并不是说就闲置了,ES会拿机器剩余的内存来优化自身的查询效率。也就是说,并不是一味将最大内存设置很大就是最优解。</p>]]></description></item><item><title>MyBatis问题汇总</title><link>https://lewky.cn/posts/mybatis-issues/</link><pubDate>Thu, 03 Mar 2022 23:10:33 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/mybatis-issues/</guid><description><![CDATA[<h2 id="使用domainobjectrenamingrule报错">使用domainObjectRenamingRule报错</h2>
<p>在使用MyBatis逆向工程时报错如下:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">org.mybatis.generator.exception.XMLParserException: XML Parser Error on line 43: 必须声明元素类型 "domainObjectRenamingRule"。
</span></span><span class="line"><span class="cl"> at org.mybatis.generator.config.xml.ConfigurationParser.parseConfiguration(ConfigurationParser.java:121)
</span></span><span class="line"><span class="cl"> at org.mybatis.generator.config.xml.ConfigurationParser.parseConfiguration(ConfigurationParser.java:82)
</span></span><span class="line"><span class="cl"> at org.mybatis.generator.config.xml.ConfigurationParser.parseConfiguration(ConfigurationParser.java:74)
</span></span><span class="line"><span class="cl"> at GeneratorSqlmap.generator(GeneratorSqlmap.java:22)
</span></span><span class="line"><span class="cl"> at GeneratorSqlmap.main(GeneratorSqlmap.java:32)
</span></span></code></pre></td></tr></table>
</div>
</div>]]></description></item><item><title>PostgreSQL - SQL调优方案</title><link>https://lewky.cn/posts/postgresql-sql-tuning/</link><pubDate>Thu, 03 Mar 2022 08:09:26 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/postgresql-sql-tuning/</guid><description><![CDATA[<h2 id="查询执行很长时间的sql慢sql">查询执行很长时间的SQL(慢SQL)</h2>
<p>可以通过查询系统表来找到目前处于活跃状态的SQL:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">pg_stat_activity</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">datname</span><span class="o">=</span><span class="s1">'数据库名'</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">and</span><span class="w"> </span><span class="n">client_addr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'发起查询的IP地址'</span><span class="w"> </span><span class="k">order</span><span class="w"> </span><span class="k">by</span><span class="w"> </span><span class="n">state_change</span><span class="w"> </span><span class="k">desc</span><span class="p">;</span><span class="w">
</span></span></span></code></pre></td></tr></table>
</div>
</div>]]></description></item><item><title>Java - 字符编码</title><link>https://lewky.cn/posts/java-charset/</link><pubDate>Sun, 13 Feb 2022 10:42:08 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/java-charset/</guid><description><h2 id="字符集">字符集</h2>
<p>字符集是一系列字符的集合,将每个收录的字符和数字进行映射。最早的字符集是ASCII,使用一个字节进行存储字符,8位一共可以表示256个字符,而ASCII只使用了其中的128位,即0~127位,这128位里面包括了常用的英文字符以及标点符号。</p></description></item><item><title>Spring Data Redis问题汇总</title><link>https://lewky.cn/posts/spring-data-redis/</link><pubDate>Thu, 13 Jan 2022 23:10:42 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/spring-data-redis/</guid><description><![CDATA[<h2 id="前言">前言</h2>
<p>本文基于以下版本:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="c"><!-- 对应的是3.3.0版本的jedis(redis的java客户端) --></span>
</span></span><span class="line"><span class="cl"><span class="nt"><dependency></span>
</span></span><span class="line"><span class="cl"> <span class="nt"><groupId></span>org.springframework.boot<span class="nt"></groupId></span>
</span></span><span class="line"><span class="cl"> <span class="nt"><artifactId></span>spring-boot-starter-data-redis<span class="nt"></artifactId></span>
</span></span><span class="line"><span class="cl"> <span class="nt"><version></span>2.4.0<span class="nt"></version></span>
</span></span><span class="line"><span class="cl"><span class="nt"></dependency></span>
</span></span></code></pre></td></tr></table>
</div>
</div>]]></description></item><item><title>Java数值问题汇总</title><link>https://lewky.cn/posts/java-number/</link><pubDate>Mon, 10 Jan 2022 23:03:06 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/java-number/</guid><description><![CDATA[<h2 id="double转成bigdecimal的精度损失问题">double转成BigDecimal的精度损失问题</h2>
<p>如果直接用构造方法将double数值转成BigDecimal,可能存在损失精度的问题:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-java" data-lang="java"><span class="line"><span class="cl"><span class="kd">final</span> <span class="n">BigDecimal</span> <span class="n">b1</span> <span class="o">=</span> <span class="k">new</span> <span class="n">BigDecimal</span><span class="o">(</span><span class="mf">0.48</span><span class="o">);</span>
</span></span><span class="line"><span class="cl"><span class="kd">final</span> <span class="n">BigDecimal</span> <span class="n">b2</span> <span class="o">=</span> <span class="n">BigDecimal</span><span class="o">.</span><span class="na">valueOf</span><span class="o">(</span><span class="mf">0.48</span><span class="o">);</span>
</span></span><span class="line"><span class="cl"><span class="c1">// 0.479999999999999982236431605997495353221893310546875
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">b1</span><span class="o">);</span>
</span></span><span class="line"><span class="cl"><span class="c1">// 0.48
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">b2</span><span class="o">);</span>
</span></span></code></pre></td></tr></table>
</div>
</div>]]></description></item><item><title>lombok问题汇总</title><link>https://lewky.cn/posts/lombok-issues/</link><pubDate>Thu, 06 Jan 2022 09:01:30 +0800</pubDate><author>文章作者</author><guid>https://lewky.cn/posts/lombok-issues/</guid><description><![CDATA[<h2 id="eclipse安装lombok插件">Eclipse安装lombok插件</h2>
<h3 id="方式一">方式一</h3>
<p>使用lombok框架开发可以减少大量重复性的代码,大大提高开发效率,但是Eclipse本身并不支持lombok,会编译报错。除了项目要导入lombok依赖,还需要为Eclipse安装该lombok插件。</p>
<p>安装方法很简单,找到你导入的lombok的jar包,双击运行该jar包,会出现一个安装界面。或者右键jar包,选择<code>打开方式</code>,接着选择<code>Java (TM) Platform SE binary</code>,会出现安装界面。</p>
<p>在安装界面选择当前的Eclipse进程,或者点击左下角的<code>Specify location...</code>选择你要安装插件的Eclipse,接着点右下角的<code>Install / Update</code>,很快就安装完毕,点击<code>Quit Installer</code>。</p>
<p>lombok的下载地址:https://projectlombok.org/downloads/lombok.jar</p>]]></description></item></channel></rss>