<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Reid的专栏]]></title><description><![CDATA[日常工作和学习记录]]></description><link>https://blog.csdn.net/zhang_Red</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; zhang_Red]]></copyright><item><title><![CDATA[发送邮件附件名tcmime.*.bin]]></title><link>https://blog.csdn.net/zhang_Red/article/details/125041949</link><guid>https://blog.csdn.net/zhang_Red/article/details/125041949</guid><author>zhang_Red</author><pubDate>Mon, 30 May 2022 10:26:56 +0800</pubDate><description><![CDATA[默认java关于邮箱的参数splitlongparameters为true, 即太长会处理为.bin

static {
        System.setProperty("mail.mime.splitlongparameters", "false");
    }


中文附件名乱码

MimeUtility.encodeText(fileName, "UTF-8", "B");


]]></description><category></category></item><item><title><![CDATA[使用hutool获取所有下级节点]]></title><link>https://blog.csdn.net/zhang_Red/article/details/121697440</link><guid>https://blog.csdn.net/zhang_Red/article/details/121697440</guid><author>zhang_Red</author><pubDate>Fri, 03 Dec 2021 14:11:43 +0800</pubDate><description><![CDATA[@Slf4j
public class MainTest {

    public static void main(String[] args) throws IOException {
        List&lt;Tree&lt;Long&gt;&gt; list = new ArrayList&lt;&gt;();

        Tree&lt;Long&gt; t1 = new Tree&lt;&gt;();
        t1.setId(1L);
        t1.setPare]]></description><category></category></item><item><title><![CDATA[SpringBoot获取resources下的文件]]></title><link>https://blog.csdn.net/zhang_Red/article/details/121659360</link><guid>https://blog.csdn.net/zhang_Red/article/details/121659360</guid><author>zhang_Red</author><pubDate>Wed, 01 Dec 2021 16:56:37 +0800</pubDate><description><![CDATA[例如下载/resources/excel/template.xlsx
    @GetMapping("/download")
    public void downloadFile(HttpServletRequest request,
                             HttpServletResponse response) {
        String fullFileName = "excel/template.xlsx";
        ExcelUtils.ex]]></description><category></category></item><item><title><![CDATA[Jackson自定义反序列化，将对象属性反序列化成字符串]]></title><link>https://blog.csdn.net/zhang_Red/article/details/121499989</link><guid>https://blog.csdn.net/zhang_Red/article/details/121499989</guid><author>zhang_Red</author><pubDate>Tue, 23 Nov 2021 18:49:22 +0800</pubDate><description><![CDATA[public class NoticeResponse {
	@JsonDeserialize(using = ContentSerializer.class)
    private String content;
}

static class ContentSerializer extends JsonDeserializer&lt;String&gt; {

        public ContentSerializer() {
        }

        @Override
    .]]></description><category></category></item><item><title><![CDATA[查看mysql锁]]></title><link>https://blog.csdn.net/zhang_Red/article/details/120490955</link><guid>https://blog.csdn.net/zhang_Red/article/details/120490955</guid><author>zhang_Red</author><pubDate>Sun, 26 Sep 2021 16:05:07 +0800</pubDate><description><![CDATA[-- 显示用户正在运行的线程
show full processlist;

show processlist;

select * from information_schema.processlist where db='db_name';

-- 查看innodb的事务 
SELECT * FROM INFORMATION_SCHEMA.INNODB_TRX;

-- 查看事务对应的线程
select * from information_schema.processlist where ID=339]]></description><category></category></item><item><title><![CDATA[Mybatis-Plus使用枚举类型int值，Mysql tinyint(1)返回null]]></title><link>https://blog.csdn.net/zhang_Red/article/details/116502267</link><guid>https://blog.csdn.net/zhang_Red/article/details/116502267</guid><author>zhang_Red</author><pubDate>Fri, 07 May 2021 20:44:42 +0800</pubDate><description><![CDATA[问题描述：
Mybatis-Plus在使用枚举类型，如果Mysql数据库中字段类型是tinyint(1) 而枚举值类型为Integer，导致转换时枚举类型为null。
修改：tinyint(2) 即可

]]></description><category></category></item><item><title><![CDATA[SpringSecurity异步执行时上线文传递]]></title><link>https://blog.csdn.net/zhang_Red/article/details/116502202</link><guid>https://blog.csdn.net/zhang_Red/article/details/116502202</guid><author>zhang_Red</author><pubDate>Fri, 07 May 2021 20:42:03 +0800</pubDate><description><![CDATA[官网说明： https://spring.io/guides/topicals/spring-security-architecture


]]></description><category></category></item><item><title><![CDATA[SpringBoot发送邮件报错：Got bad greeting from SMTP host: smtp.exmail.qq.com, port: 465, response: [EOF]]]></title><link>https://blog.csdn.net/zhang_Red/article/details/115234112</link><guid>https://blog.csdn.net/zhang_Red/article/details/115234112</guid><author>zhang_Red</author><pubDate>Fri, 26 Mar 2021 11:28:34 +0800</pubDate><description><![CDATA[错误
Got bad greeting from SMTP host: smtp.exmail.qq.com, port: 465, response: [EOF]

原配置：
spring:
	mail:
	    default-encoding: UTF-8
	    host: smtp.exmail.qq.com
	    password: password
	    port: 465
	    username: username@mail.com

修改后：
spring:
	mail:
]]></description><category></category></item><item><title><![CDATA[高德地图逆地理编码时city返回数组或者空字符串的反序列化的问题]]></title><link>https://blog.csdn.net/zhang_Red/article/details/114292003</link><guid>https://blog.csdn.net/zhang_Red/article/details/114292003</guid><author>zhang_Red</author><pubDate>Tue, 02 Mar 2021 19:04:50 +0800</pubDate><description><![CDATA[问题描述
高德地图逆地理编码接口返回数据是，city字段有时为[]， 有时为字符串：
请注意：当城市是省直辖县时返回为空，以及城市为北京、上海、天津、重庆四个直辖市时，该字段返回为空；

使用Jackson反序列化时会有问题，解决办法如下：
    @Getter
    @Setter
    @ToString
    public static class AddressComponent {

        private String country;

        private Stri]]></description><category></category></item><item><title><![CDATA[替换文本中的URL为超链接标签＜a＞]]></title><link>https://blog.csdn.net/zhang_Red/article/details/110933900</link><guid>https://blog.csdn.net/zhang_Red/article/details/110933900</guid><author>zhang_Red</author><pubDate>Wed, 09 Dec 2020 18:16:54 +0800</pubDate><description><![CDATA[public static String regexURL(String str) {       
        String regex = "((http|ftp|https)://)?"
                + "(([a-zA-Z0-9\\._-]+\\."
                + "[a-zA-Z]{2,6})|([0-9]{1,3}\\.[0-9]{1,3}\\."
                + "[0-9]{1,3}\\.[0-9]{1,3}))(:[0-9]]]></description><category></category></item><item><title><![CDATA[@types/wechat-miniprogram/index.js 未找到npm包入口文件？]]></title><link>https://blog.csdn.net/zhang_Red/article/details/109468422</link><guid>https://blog.csdn.net/zhang_Red/article/details/109468422</guid><author>zhang_Red</author><pubDate>Tue, 03 Nov 2020 14:12:43 +0800</pubDate><description><![CDATA[使用npm i vant-weapp -S --production会改变目录结构，我是通过npm i @vant/weapp -S – production构建以后，删除node_modules下的@types整个文件夹，然后再用工具 → 构建npm的
参考：https://developers.weixin.qq.com/community/develop/doc/0006285df40970c3ac2bf536c51400

...]]></description><category></category></item><item><title><![CDATA[升级到Springboot2之后shiro登录403]]></title><link>https://blog.csdn.net/zhang_Red/article/details/109068574</link><guid>https://blog.csdn.net/zhang_Red/article/details/109068574</guid><author>zhang_Red</author><pubDate>Wed, 14 Oct 2020 11:15:50 +0800</pubDate><description><![CDATA[问题描述：
springboot从1.5 到 springboot2.1 时，Shiro的配置都没有变，但是登录url也被拦截了返回403
原因：
在springboot1.5中
server:
  context-path: /myapp

升级到2之后，需要改为
server:
  servlet:
    context-path: /myapp


...]]></description><category></category></item><item><title><![CDATA[java.lang.SecurityException: JCE cannot authenticate the provider BC]]></title><link>https://blog.csdn.net/zhang_Red/article/details/109002469</link><guid>https://blog.csdn.net/zhang_Red/article/details/109002469</guid><author>zhang_Red</author><pubDate>Sat, 10 Oct 2020 18:53:50 +0800</pubDate><description><![CDATA[错误信息： java.lang.SecurityException: JCE cannot authenticate the provider BC
环境描述：

jdk 11.0.3
tomcat 8.5.8

加解密依赖hutool
&lt;dependency&gt;
    &lt;groupId&gt;cn.hutool&lt;/groupId&gt;
    &lt;artifactId&gt;hutool-all&lt;/artifactId&gt;
    &lt;version&gt;5.]]></description><category></category></item><item><title><![CDATA[Shiro Realm中使用dubbo的service时无法注入的问题]]></title><link>https://blog.csdn.net/zhang_Red/article/details/108882678</link><guid>https://blog.csdn.net/zhang_Red/article/details/108882678</guid><author>zhang_Red</author><pubDate>Wed, 30 Sep 2020 11:37:24 +0800</pubDate><description><![CDATA[问题描述
ShiroConfig 中配置Realm，而Realm中调用了dubbo的服务。
ShiroConfig.java

@Autowired
private IShiroService shiroService

@Bean("shiroDbRealm")
public ShiroDbRealm shiroDbRealm() {
    ShiroDbRealm shiroDbRealm = new ShiroDbRealm();
    // 测试 shiroService 尚未注入
    sh]]></description><category></category></item><item><title><![CDATA[NoSuchAlgorithmException: Cannot find any provider supporting AES/CBC/PKCS7Padding]]></title><link>https://blog.csdn.net/zhang_Red/article/details/108866111</link><guid>https://blog.csdn.net/zhang_Red/article/details/108866111</guid><author>zhang_Red</author><pubDate>Tue, 29 Sep 2020 12:11:43 +0800</pubDate><description><![CDATA[参考：
https://www.liaoxuefeng.com/wiki/1252599548343744/1305362418368545
Java标准库不支持AES/CBC/PKCS7Padding 可以使用BouncyCastle库中的算法。具体操作

添加依赖

&lt;dependency&gt;
    &lt;groupId&gt;org.bouncycastle&lt;/groupId&gt;
    &lt;artifactId&gt;bcprov-jdk15on&lt;/artifact]]></description><category></category></item><item><title><![CDATA[java8升级到java11时maven编译报错 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plug]]></title><link>https://blog.csdn.net/zhang_Red/article/details/108204765</link><guid>https://blog.csdn.net/zhang_Red/article/details/108204765</guid><author>zhang_Red</author><pubDate>Mon, 24 Aug 2020 18:21:08 +0800</pubDate><description><![CDATA[[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project orderapp: Fatal error compiling: CompilerException: NullPointerException -&gt; [Help 1]

解决办法：
添加Maven依赖
&lt;dependency&gt;
    &lt;gro]]></description><category></category></item><item><title><![CDATA[Docker+ Springboot本地模拟集群]]></title><link>https://blog.csdn.net/zhang_Red/article/details/106634578</link><guid>https://blog.csdn.net/zhang_Red/article/details/106634578</guid><author>zhang_Red</author><pubDate>Tue, 09 Jun 2020 09:58:10 +0800</pubDate><description><![CDATA[第一步：拉取nginx的官方镜像
镜像地址: https://hub.docker.com/search?q=nginx&amp;type=image
使用NGINX的官方镜像，然后拉取到本地

执行docker images如果有下面的信息则表示拉取成功

第二步：
nginx.conf文件如下
user  nginx;
worker_processes  auto;
 
# error_log  /Users/mac/Desktop/nginx/log/error.log warn;
# pid    ]]></description><category></category></item><item><title><![CDATA[Http Https Tcp概述]]></title><link>https://blog.csdn.net/zhang_Red/article/details/106258736</link><guid>https://blog.csdn.net/zhang_Red/article/details/106258736</guid><author>zhang_Red</author><pubDate>Thu, 21 May 2020 19:20:18 +0800</pubDate><description><![CDATA[参考资料：

https://juejin.im/post/5d7085f6f265da03dd3d92f6
https://www.cnblogs.com/ttltry-air/archive/2012/08/20/2647898.html
https://www.zhihu.com/question/302412059
https://juejin.im/post/5ab308e9f265da238e0da39b
https://www.w3ctech.com/topic/1563
https://dr]]></description><category></category></item><item><title><![CDATA[JAVA优雅的退出机制]]></title><link>https://blog.csdn.net/zhang_Red/article/details/104015239</link><guid>https://blog.csdn.net/zhang_Red/article/details/104015239</guid><author>zhang_Red</author><pubDate>Fri, 17 Jan 2020 10:27:28 +0800</pubDate><description><![CDATA[JAVA优雅的退出机制
参考：


Netty 优雅退出机制和原理


Java 优雅地退出程序


每天一个linux命令（42）：kill命令


一、JAVA进程退出时机：

虚拟机中可能同时有多个线程运行，只有当所有的非守护线程（通常都是用户线程）都结束的时候，虚拟机的进程才会结束，不管当前运行的线程是不是main线程。
main 线程运行结束，如果此时运行的其他线程全部是 Daemon ...]]></description><category></category></item><item><title><![CDATA[RestTemplate打印响应结果]]></title><link>https://blog.csdn.net/zhang_Red/article/details/91960182</link><guid>https://blog.csdn.net/zhang_Red/article/details/91960182</guid><author>zhang_Red</author><pubDate>Fri, 14 Jun 2019 11:43:31 +0800</pubDate><description><![CDATA[https://github.com/spring-projects/spring-android/blob/master/spring-android-rest-template/src/main/java/org/springframework/http/client/BufferingClientHttpResponseWrapper.java
import lombok.extern.sl...]]></description><category></category></item></channel></rss>