博客园 - 玄同太子
uuid:24b78886-0ed1-41c2-8670-e3f31dcf42c4;id=4642
2023-06-19T08:12:43Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
feed.cnblogs.com
https://www.cnblogs.com/zhi-leaf/p/17491325.html
Linux根据PID查询进场所在目录 - 玄同太子
1、查询端口占用情况 netstat -tunlp | grep 8030 2、进入任务目录 cd /proc/77662 # 77662为pid 3、查询目录 ls -ail cmd行指向就是进程所在目录了
2023-06-19T07:44:00Z
2023-06-19T07:44:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】1、查询端口占用情况 netstat -tunlp | grep 8030 2、进入任务目录 cd /proc/77662 # 77662为pid 3、查询目录 ls -ail cmd行指向就是进程所在目录了 <a href="https://www.cnblogs.com/zhi-leaf/p/17491325.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/17440392.html
使用H2数据库搭建springboot应用 - 玄同太子
h2数据库有2中模型,一种是嵌入式,一种是服务端。嵌入式时,我们多个配置同一个地址就可以访问同一个数据集,服务端需要额外开启服务,再通过ip端口访问。这里我们介绍下怎么在springboot项目下开启服务端模式。 1、在springboot应准备就绪后启动h2服务 public class H2Se
2023-05-29T06:43:00Z
2023-05-29T06:43:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】h2数据库有2中模型,一种是嵌入式,一种是服务端。嵌入式时,我们多个配置同一个地址就可以访问同一个数据集,服务端需要额外开启服务,再通过ip端口访问。这里我们介绍下怎么在springboot项目下开启服务端模式。 1、在springboot应准备就绪后启动h2服务 public class H2Se <a href="https://www.cnblogs.com/zhi-leaf/p/17440392.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/17378288.html
SpringBoot集成RocketMQ - 玄同太子
1、添加pom.xml依赖 <dependency> <groupId>org.apache.rocketmq</groupId> <artifactId>rocketmq-spring-boot-starter</artifactId> <version>2.2.3</version> </dep
2023-05-06T11:49:00Z
2023-05-06T11:49:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】1、添加pom.xml依赖 <dependency> <groupId>org.apache.rocketmq</groupId> <artifactId>rocketmq-spring-boot-starter</artifactId> <version>2.2.3</version> </dep <a href="https://www.cnblogs.com/zhi-leaf/p/17378288.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/17377917.html
RocketMQ单机版安装 - 玄同太子
1、下载最新的安装包 github下载地址:https://github.com/apache/rocketmq/releases。本文安装版本为:rocketmq-all-5.1.0-bin-release.zip 2、安装JDK 3、上传并解压安装包 # 从本地电脑上传安装包到Linux服务器
2023-05-06T09:49:00Z
2023-05-06T09:49:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】1、下载最新的安装包 github下载地址:https://github.com/apache/rocketmq/releases。本文安装版本为:rocketmq-all-5.1.0-bin-release.zip 2、安装JDK 3、上传并解压安装包 # 从本地电脑上传安装包到Linux服务器 <a href="https://www.cnblogs.com/zhi-leaf/p/17377917.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/17273379.html
CentOS系统使用docker自己创建镜像安装Doris1.2.3数据库 - 玄同太子
doris当前最新版本为1.2.3,本安装文档在官网的介绍下做了一点自己的修改,保证可用。我使用的是虚拟机安装,要保证设置10G的内存。 1、docker与docker-compose安装 docker安装:CentOS安装Docker docker-compose安装:docker-compose
2023-04-12T12:36:00Z
2023-04-12T12:36:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】doris当前最新版本为1.2.3,本安装文档在官网的介绍下做了一点自己的修改,保证可用。我使用的是虚拟机安装,要保证设置10G的内存。 1、docker与docker-compose安装 docker安装:CentOS安装Docker docker-compose安装:docker-compose <a href="https://www.cnblogs.com/zhi-leaf/p/17273379.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/17306266.html
CentOS安装Minio-rpm方式 - 玄同太子
1、下载minio 中国镜像地址:https://dl.minio.org.cn/server/minio/。我下载的版本是:minio-20230407052858.0.0.x86_64.rpm 2、安装rpm文件 scp minio-20230407052858.0.0.x86_64.rpm r
2023-04-11T07:49:00Z
2023-04-11T07:49:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】1、下载minio 中国镜像地址:https://dl.minio.org.cn/server/minio/。我下载的版本是:minio-20230407052858.0.0.x86_64.rpm 2、安装rpm文件 scp minio-20230407052858.0.0.x86_64.rpm r <a href="https://www.cnblogs.com/zhi-leaf/p/17306266.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/17275726.html
解决docker环境apt-get命令太慢问题 - 玄同太子
最近学习doris,准备在本地使用docker搭建一个环境,doris文档提供Dockfile中有这么一段: RUN apt-get update && \ apt-get install -y default-mysql-client && \ apt-get clean && \ mkdir /
2023-03-31T03:18:00Z
2023-03-31T03:18:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】最近学习doris,准备在本地使用docker搭建一个环境,doris文档提供Dockfile中有这么一段: RUN apt-get update && \ apt-get install -y default-mysql-client && \ apt-get clean && \ mkdir / <a href="https://www.cnblogs.com/zhi-leaf/p/17275726.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/17274049.html
docker启动失败 exec /xxx.sh: no such file or directory - 玄同太子
正常编写的.sh文件拷贝到docker容器,启动时报错no such file or directory,大概率是格式问题 可以用notepad++转换成unix格式,在拷贝到linux环境 如果在linux环境下,我们可以用vi命令打开文件,再按组合建shift+:;(:;为字母L右边的按键) 在
2023-03-30T11:15:00Z
2023-03-30T11:15:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】正常编写的.sh文件拷贝到docker容器,启动时报错no such file or directory,大概率是格式问题 可以用notepad++转换成unix格式,在拷贝到linux环境 如果在linux环境下,我们可以用vi命令打开文件,再按组合建shift+:;(:;为字母L右边的按键) 在 <a href="https://www.cnblogs.com/zhi-leaf/p/17274049.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/17273789.html
docker启动失败后怎么查看日志 - 玄同太子
方法一: docker logs --since 30m container # 查看30分钟日志,容器成功失败都可以查看,container表示容器名称或ID 方法二: docker inspect --format '{{.LogPath}}' container # 查询容器日志文件目录 vi
2023-03-30T09:41:00Z
2023-03-30T09:41:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】方法一: docker logs --since 30m container # 查看30分钟日志,容器成功失败都可以查看,container表示容器名称或ID 方法二: docker inspect --format '{{.LogPath}}' container # 查询容器日志文件目录 vi <a href="https://www.cnblogs.com/zhi-leaf/p/17273789.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/17252237.html
on duplicate key update - 玄同太子
on duplicate key update是mysql的特殊用法,当insert操作出现主键冲突时执行更新操作,样例如下: insert into zhi_test.bd_user (id, user_code, user_name, create_time, update_time) valu
2023-03-24T07:47:00Z
2023-03-24T07:47:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】on duplicate key update是mysql的特殊用法,当insert操作出现主键冲突时执行更新操作,样例如下: insert into zhi_test.bd_user (id, user_code, user_name, create_time, update_time) valu <a href="https://www.cnblogs.com/zhi-leaf/p/17252237.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/17191880.html
Spring重试框架验证(spring-retry) - 玄同太子
最近研究openfeign的重试原理时,发现其依赖spring-retry框架,不禁好奇并测试一二。使用步骤如下: 1、添加pom.xml依赖(springboot版本为2.6.14) <dependency> <groupId>org.springframework.boot</groupId>
2023-03-08T06:27:00Z
2023-03-08T06:27:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】最近研究openfeign的重试原理时,发现其依赖spring-retry框架,不禁好奇并测试一二。使用步骤如下: 1、添加pom.xml依赖(springboot版本为2.6.14) <dependency> <groupId>org.springframework.boot</groupId> <a href="https://www.cnblogs.com/zhi-leaf/p/17191880.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/17187175.html
nacos注册成windows服务 - 玄同太子
1、下载winsw,我用得版本是v2.11.0 下载地址:https://github.com/winsw/winsw/releases 2、将下载的WinSW-x64.exe放到 nacos\bin 目录,并改名为nacos.exe 3、在 nacos\bin 目录下创建nacos.xml文件 <
2023-03-07T02:27:00Z
2023-03-07T02:27:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】1、下载winsw,我用得版本是v2.11.0 下载地址:https://github.com/winsw/winsw/releases 2、将下载的WinSW-x64.exe放到 nacos\bin 目录,并改名为nacos.exe 3、在 nacos\bin 目录下创建nacos.xml文件 < <a href="https://www.cnblogs.com/zhi-leaf/p/17187175.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/17175703.html
Windows系统安装Redis服务 - 玄同太子
网上有很多的安装教程,但Redis版本都比较老,最近从github上搜索到最新版本,验证可用,记录一下 1、应用下载地址:https://github.com/zkteco-home/redis-windows 2、选择对应得tag,下载安装包。下载7.0.9。 3、安装和取消安装服务 redis-
2023-03-03T07:11:00Z
2023-03-03T07:11:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】网上有很多的安装教程,但Redis版本都比较老,最近从github上搜索到最新版本,验证可用,记录一下 1、应用下载地址:https://github.com/zkteco-home/redis-windows 2、选择对应得tag,下载安装包。下载7.0.9。 3、安装和取消安装服务 redis- <a href="https://www.cnblogs.com/zhi-leaf/p/17175703.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/17167973.html
springboot使用springdoc代替springfox集成swagger - 玄同太子
springfox-boot-starter最新版本号为3.0.0,能够很好的集成swagger3到springboot项目中,但开局即巅峰,进入21年后,springfox就再没有更新维护,目前存在不少问题,且与spring-webmvc >= 5.3版本不兼容,springboot版本升级后会出
2023-03-01T06:08:00Z
2023-03-01T06:08:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】springfox-boot-starter最新版本号为3.0.0,能够很好的集成swagger3到springboot项目中,但开局即巅峰,进入21年后,springfox就再没有更新维护,目前存在不少问题,且与spring-webmvc >= 5.3版本不兼容,springboot版本升级后会出 <a href="https://www.cnblogs.com/zhi-leaf/p/17167973.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/17164379.html
使用spring.config.import引入配置 - 玄同太子
springboot >= 2.4.0版本,已经不使用bootstrap.yml作为启动配置文件了,参考:#2905,确有必要时,需主动加入依赖spring-cloud-starter-bootstrap包 nacos也支持使用spring.config.import方式引入配置,参考:#2349,
2023-02-28T07:15:00Z
2023-02-28T07:15:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】springboot >= 2.4.0版本,已经不使用bootstrap.yml作为启动配置文件了,参考:#2905,确有必要时,需主动加入依赖spring-cloud-starter-bootstrap包 nacos也支持使用spring.config.import方式引入配置,参考:#2349, <a href="https://www.cnblogs.com/zhi-leaf/p/17164379.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/16932846.html
使用spring-boot-starter-mail发送邮件 - 玄同太子
pom.xml依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-mail</artifactId> </dependency> properties配置: sprin
2022-11-28T09:37:00Z
2022-11-28T09:37:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】pom.xml依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-mail</artifactId> </dependency> properties配置: sprin <a href="https://www.cnblogs.com/zhi-leaf/p/16932846.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/16832434.html
使用RestTemplate上传下载文件 - 玄同太子
1、使用form表单上传文件 文件发送: @Test public void storeFile1() { File file = new File("D:\\test.txt"); String uploadUrl = "http://127.0.0.1:8080/upload1"; HttpHe
2022-10-27T07:30:00Z
2022-10-27T07:30:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】1、使用form表单上传文件 文件发送: @Test public void storeFile1() { File file = new File("D:\\test.txt"); String uploadUrl = "http://127.0.0.1:8080/upload1"; HttpHe <a href="https://www.cnblogs.com/zhi-leaf/p/16832434.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/16810700.html
使用versions-maven-plugin插件批量修改pom.xml版本 - 玄同太子
Java开发过程中,通常一个项目有多个子模块(项目结构如下),我们发布新版本后,需要创建新的分支并修改pom.xml中的版本号,如果模块过多,这是一个麻烦的事情,但我们有versions-maven-plugin插件,可以非常方便的修改版本号 1、父项目pom.xml中引入插件依赖 <plugin>
2022-10-20T09:37:00Z
2022-10-20T09:37:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】Java开发过程中,通常一个项目有多个子模块(项目结构如下),我们发布新版本后,需要创建新的分支并修改pom.xml中的版本号,如果模块过多,这是一个麻烦的事情,但我们有versions-maven-plugin插件,可以非常方便的修改版本号 1、父项目pom.xml中引入插件依赖 <plugin> <a href="https://www.cnblogs.com/zhi-leaf/p/16810700.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/16809758.html
git代码迁移 - 玄同太子
1、新建一个仓库,不要初始化,否词后面无法推送 2、将原仓库代码下载到本地 git clone --bare https://github.com/zhi-leaf/move-test.git 3、进入目录 cd move-test.git 4、切换仓库地址 git remote set-url o
2022-10-20T06:30:00Z
2022-10-20T06:30:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】1、新建一个仓库,不要初始化,否词后面无法推送 2、将原仓库代码下载到本地 git clone --bare https://github.com/zhi-leaf/move-test.git 3、进入目录 cd move-test.git 4、切换仓库地址 git remote set-url o <a href="https://www.cnblogs.com/zhi-leaf/p/16809758.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/zhi-leaf/p/16744703.html
JWT生成Token - 玄同太子
Jar包引入 <dependency> <groupId>com.auth0</groupId> <artifactId>java-jwt</artifactId> <version>4.0.0</version> </dependency> Java代码示例: public class JwtTo
2022-09-30T05:58:00Z
2022-09-30T05:58:00Z
玄同太子
https://www.cnblogs.com/zhi-leaf/
【摘要】Jar包引入 <dependency> <groupId>com.auth0</groupId> <artifactId>java-jwt</artifactId> <version>4.0.0</version> </dependency> Java代码示例: public class JwtTo <a href="https://www.cnblogs.com/zhi-leaf/p/16744703.html" target="_blank">阅读全文</a>